From becda6ba8ae0b58f8e2bce285a3fd6980bc9f52d Mon Sep 17 00:00:00 2001 From: David Benson Date: Thu, 5 May 2022 17:52:25 +0100 Subject: [PATCH] 18.0.1 release --- ChangeLog | 9 + VERSION | 2 +- src/main/webapp/js/app.min.js | 1032 ++++++++-------- src/main/webapp/js/diagramly/EditorUi.js | 6 +- src/main/webapp/js/diagramly/ElectronApp.js | 53 +- src/main/webapp/js/diagramly/Minimal.js | 69 +- .../webapp/js/diagramly/sidebar/Sidebar-ER.js | 18 +- src/main/webapp/js/grapheditor/EditorUi.js | 201 ++-- src/main/webapp/js/grapheditor/Graph.js | 34 +- src/main/webapp/js/grapheditor/Menus.js | 4 +- src/main/webapp/js/grapheditor/Toolbar.js | 19 +- src/main/webapp/js/integrate.min.js | 1024 ++++++++-------- src/main/webapp/js/viewer-static.min.js | 1061 +++++++++-------- src/main/webapp/js/viewer.min.js | 1061 +++++++++-------- src/main/webapp/mxgraph/mxClient.js | 2 +- src/main/webapp/service-worker.js | 2 +- src/main/webapp/service-worker.js.map | 2 +- 17 files changed, 2332 insertions(+), 2267 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6870eb02fb..4ef10c02e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +05-MAY-2022: 18.0.1 + +- Adds support for windows line break in CSV files +- [conf cloud] Fixes trailing space in diagram name during page IDs import +- FIxes timestamp check in watchFile [819] [DND-487] +- Hides menus and dropdowns if clicked again [2745] +- Fixes cursor handling for composite cells [2756] +- [desktop] Adds strict CSP after loading plugins (disabling unsafe-inline scripts) + 04-MAY-2022: 18.0.0 - Replaces sanitizer with DOMpurify diff --git a/VERSION b/VERSION index 03191c968c..1bb332bc46 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -18.0.0 \ No newline at end of file +18.0.1 \ No newline at end of file diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index b3c500b02e..63b3e9e728 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -468,7 +468,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0"; "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; -window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -2343,62 +2343,62 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a}; Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var c=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0y.clientHeight-r&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage), -e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=x+14+"px",e.style.left=w+d+38-n+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){F=!0}),null,mxUtils.bind(this,function(b){F&&(a.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g(); -null!=e&&(p=d=e.w,q=c=e.h)}e=mxUtils.getDocumentSize();t=e.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");w=Math.max(1,Math.round((e.width-d-r)/2));x=Math.max(1,Math.round((t-c-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-r):p;c=Math.min(q,t-r);e=this.getPosition(w,x,d,c);w=e.x;x=e.y;y.style.left=w+"px";y.style.top=x+"px";y.style.width=d+"px";y.style.height=c+"px";!k&& +x+=a.embedViewport.y,w+=a.embedViewport.x);f&&document.body.appendChild(this.bg);var y=a.createDiv(h?"geTransDialog":"geDialog");f=this.getPosition(w,x,d,c);w=f.x;x=f.y;y.style.width=d+"px";y.style.height=c+"px";y.style.left=w+"px";y.style.top=x+"px";y.style.zIndex=this.zIndex;y.appendChild(b);document.body.appendChild(y);!g&&b.clientHeight>y.clientHeight-r&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage), +e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=x+14+"px",e.style.left=w+d+38-n+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){F=!0}),null,mxUtils.bind(this,function(b){F&&(a.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var e=k(); +null!=e&&(p=d=e.w,q=c=e.h)}e=mxUtils.getDocumentSize();t=e.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");w=Math.max(1,Math.round((e.width-d-r)/2));x=Math.max(1,Math.round((t-c-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-r):p;c=Math.min(q,t-r);e=this.getPosition(w,x,d,c);w=e.x;x=e.y;y.style.left=w+"px";y.style.top=x+"px";y.style.width=d+"px";y.style.height=c+"px";!g&& b.clientHeight>y.clientHeight-r&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=x+14+"px",this.dialogImg.style.left=w+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=l;this.container=y;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,d,c,f,e,l,k,h,g,m){h=null!=h?h:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,b);p.setAttribute("title",b);n.appendChild(p)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",d.appendChild(g));var q=mxUtils.button(c,function(){h&&a.hideDialog();null!=f&&f()}); -q.className="geBtn";d.appendChild(q);null!=l&&(c=mxUtils.button(l,function(){h&&a.hideDialog();null!=k&&k()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var b=k.checked||g.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var l=k.checked?1:parseInt(m.value);isNaN(l)||(f=mxUtils.getScaleForPageCount(l,d,e))}d.getGraphBounds();var h=l=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),l-=c.x*e.width,h-=c.y*e.height): -b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,l,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,c,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var l=document.createElement("tbody");c=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(k);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage")); -f.appendChild(h);mxEvent.addListener(h,"click",function(a){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(a)});mxEvent.addListener(k,"change",function(){g.checked=!k.checked});c.appendChild(f);l.appendChild(c);c=c.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(g);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");f.appendChild(h);mxEvent.addListener(h, -"click",function(a){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");c.appendChild(f);l.appendChild(c);mxEvent.addListener(g,"change", -function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");k.checked=!g.checked});c=c.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");c.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);c.appendChild(f);l.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.colSpan=2; +var ErrorDialog=function(a,b,d,c,f,e,l,g,h,k,m){h=null!=h?h:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,b);p.setAttribute("title",b);n.appendChild(p)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=m&&m()}),k.className="geBtn",d.appendChild(k));var q=mxUtils.button(c,function(){h&&a.hideDialog();null!=f&&f()}); +q.className="geBtn";d.appendChild(q);null!=l&&(c=mxUtils.button(l,function(){h&&a.hideDialog();null!=g&&g()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,b){this.create(a,b)}; +PrintDialog.prototype.create=function(a){function b(a){var b=g.checked||k.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var l=g.checked?1:parseInt(m.value);isNaN(l)||(f=mxUtils.getScaleForPageCount(l,d,e))}d.getGraphBounds();var h=l=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),l-=c.x*e.width,h-=c.y*e.height): +b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,l,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,c,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var l=document.createElement("tbody");c=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage")); +f.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});c.appendChild(f);l.appendChild(c);c=c.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(k);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");f.appendChild(h);mxEvent.addListener(h, +"click",function(a){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(a)});c.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");c.appendChild(f);l.appendChild(c);mxEvent.addListener(k,"change", +function(){k.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!k.checked});c=c.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");c.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);c.appendChild(f);l.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.colSpan=2; f.style.paddingTop="20px";f.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&f.appendChild(h);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";f.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";f.appendChild(p);a.editor.cancelFirst|| f.appendChild(h);c.appendChild(f);l.appendChild(c);e.appendChild(l);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}}; -PrintDialog.createPrintPreview=function(a,b,d,c,f,e,l){b=new mxPrintPreview(a,b,d,c,f,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=l;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var k=b.writeHead;b.writeHead=function(a){k.apply(this,arguments);a.writeln('")};return b}; +PrintDialog.createPrintPreview=function(a,b,d,c,f,e,l){b=new mxPrintPreview(a,b,d,c,f,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=l;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var g=b.writeHead;b.writeHead=function(a){g.apply(this,arguments);a.writeln('")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function d(){var b=r;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var c=a.editor.graph,f,e,l=document.createElement("table");l.style.width= -"100%";l.style.height="100%";var k=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",c.pageFormat);f.appendChild(e);k.appendChild(f);f=document.createElement("tr");e=document.createElement("td"); -mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=c.background;b();mxEvent.addListener(g, -"click",function(c){a.pickColor(m||"none",function(a){m=a;b()});mxEvent.consume(c)});e.appendChild(g);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=c.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?c.getGridSize():a)});f.appendChild(e);k.appendChild(f);f=document.createElement("tr"); +var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(k.style.backgroundColor="",k.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(k.style.backgroundColor=m,k.style.backgroundImage="")}function d(){var b=r;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var c=a.editor.graph,f,e,l=document.createElement("table");l.style.width= +"100%";l.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",c.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td"); +mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var k=document.createElement("button");k.style.width="22px";k.style.height="22px";k.style.cursor="pointer";k.style.marginRight="20px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(k.style.position="relative",k.style.top="-6px");var m=c.background;b();mxEvent.addListener(k, +"click",function(c){a.pickColor(m||"none",function(a){m=a;b()});mxEvent.consume(c)});e.appendChild(k);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=c.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?c.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr"); e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var q=document.createElement("img");q.setAttribute("valign","middle");q.style.verticalAlign="middle";q.style.border="1px solid lightGray";q.style.borderRadius="4px";q.style.marginRight="14px";q.style.maxWidth="100px";q.style.cursor="pointer";q.style.height= -"60px";q.style.padding="4px";var r=c.backgroundImage,u=function(b){a.showBackgroundImageDialog(function(a,b){b||(r=a,d())},r);mxEvent.consume(b)};mxEvent.addListener(p,"click",u);mxEvent.addListener(q,"click",u);d();e.appendChild(q);e.appendChild(p);f.appendChild(e);k.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn"; +"60px";q.style.padding="4px";var r=c.backgroundImage,u=function(b){a.showBackgroundImageDialog(function(a,b){b||(r=a,d())},r);mxEvent.consume(b)};mxEvent.addListener(p,"click",u);mxEvent.addListener(q,"click",u);d();e.appendChild(q);e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn"; a.editor.cancelFirst&&e.appendChild(p);u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||c.gridSize===b||c.setGridSize(b);b=new ChangePageSetup(a,m,r,h.get());b.ignoreColor=c.background==m;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=r?r.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||c.model.execute(b)});u.className="geBtn gePrimaryBtn"; -e.appendChild(u);a.editor.cancelFirst||e.appendChild(p);f.appendChild(e);k.appendChild(f);l.appendChild(k);this.container=l}; -PageSetupDialog.addPageFormatPanel=function(a,b,d,c){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)), -Math.floor(100*parseFloat(p.value)));"custom"!=k.value&&l.checked&&(e=new mxRectangle(0,0,e.height,e.width));b&&x||e.width==y.width&&e.height==y.height||(y=e,null!=c&&c(y))};mxEvent.addListener(b,"click",function(a){e.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",F);mxEvent.addListener(n,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(e, -"change",F);mxEvent.addListener(k,"change",function(a){x="custom"==k.value;F(a,!0)});F();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}}; +t.key);mxUtils.write(w,t.title);g.appendChild(w)}var x=!1;f();a.appendChild(g);mxUtils.br(a);a.appendChild(h);a.appendChild(m);var y=d,F=function(a,b){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",h.style.display=""):(h.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)), +Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&l.checked&&(e=new mxRectangle(0,0,e.height,e.width));b&&x||e.width==y.width&&e.height==y.height||(y=e,null!=c&&c(y))};mxEvent.addListener(b,"click",function(a){e.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(k,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",F);mxEvent.addListener(n,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(e, +"change",F);mxEvent.addListener(g,"change",function(a){x="custom"==g.value;F(a,!0)});F();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,d,c,f,e,l,k,h,g,m,n){h=null!=h?h:!0;var p,q,r=document.createElement("table"),u=document.createElement("tbody");r.style.position="absolute";r.style.top="30px";r.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var t=document.createElement("input"); +var FilenameDialog=function(a,b,d,c,f,e,l,g,h,k,m,n){h=null!=h?h:!0;var p,q,r=document.createElement("table"),u=document.createElement("tbody");r.style.position="absolute";r.style.top="30px";r.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var t=document.createElement("input"); t.setAttribute("value",b||"");t.style.marginLeft="4px";t.style.width=null!=n?n+"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(t.value))h&&a.hideDialog(),c(t.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==l)if(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=r.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor= "",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments); if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.view.scale,d=this.view.translate,f=this.pageFormat,l=e*this.pageScale,h=this.view.getBackgroundPageBounds(); -b=h.width;c=h.height;var k=new mxRectangle(e*d.x,e*d.y,f.width*l,f.height*l),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,t=a?Math.ceil(b/k.width)-1:0,w=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(c/g.height)-1:0,t=a?Math.ceil(b/g.width)-1:0,w=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0mxUtils.indexOf(e,h[b])&&e.push(h[b]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"], -["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(e,l[b])&&e.push(l[b]);var n=function(a,b,d,f,l,h,g){f=null!=f?f:c.currentVertexStyle;l=null!=l?l:c.currentEdgeStyle;h=null!=h?h:!0;d=null!=d?d:c.getModel();if(g){g=[];for(var n=0;nmxUtils.indexOf(k,M))&& +g="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(a){try{var b=c.getCellStyle(a,!1),e=[],d=[],f;for(f in b)e.push(b[f]),d.push(f);c.getModel().isEdge(a)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",[a]))}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle); +c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var h=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;bmxUtils.indexOf(e,h[b])&&e.push(h[b]);var k="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"], +["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(e,l[b])&&e.push(l[b]);var n=function(a,b,d,f,l,h,k){f=null!=f?f:c.currentVertexStyle;l=null!=l?l:c.currentEdgeStyle;h=null!=h?h:!0;d=null!=d?d:c.getModel();if(k){k=[];for(var n=0;nmxUtils.indexOf(g,M))&& (x=mxUtils.setStyle(x,M,Y))}Editor.simpleLabels&&(x=mxUtils.setStyle(mxUtils.setStyle(x,"html",null),"whiteSpace",null));d.setStyle(p,x)}}finally{d.endUpdate()}return a};c.addListener("cellsInserted",function(a,b){n(b.getProperty("cells"),null,null,null,null,!0,!0)});c.addListener("textInserted",function(a,b){n(b.getProperty("cells"),!0)});this.insertHandler=n;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(a){null==a&&(a=window.event);return c.isEditing()||null!= a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown= p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return p(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer); @@ -2433,8 +2433,8 @@ y!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild, c.cellEditor.startEditing=function(){G.apply(this,arguments);E();if(c.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){var b=c.getSelectedEditingElement();null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=z.toolbar&&(z.toolbar.setFontName(Graph.stripQuotes(b.fontFamily)),z.toolbar.setFontSize(parseInt(b.fontSize))));a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",b);mxEvent.addListener(c.cellEditor.textarea,"touchend",b);mxEvent.addListener(c.cellEditor.textarea, "mouseup",b);mxEvent.addListener(c.cellEditor.textarea,"keyup",b);b()}};var J=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,b){try{J.apply(this,arguments),E()}catch(P){z.handleError(P)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(M){}var L=c.fireMouseEvent;c.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();L.apply(this,arguments)};c.popupMenuHandler.autoExpand= !0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};c.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var e=[b.getProperty("cell")];b.getProperty("terminalInserted")&&(e.push(b.getProperty("terminal")),window.setTimeout(function(){null!= -z.hoverIcons&&z.hoverIcons.update(c.view.getState(e[e.length-1]))},0));n(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("cells"),f=!1,k=!1;if(0l.length?35*l.length:140;h.className="geToolbarContainer geSidebarContainer";h.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ -mxPopupMenu.prototype.zIndex+1+";";k||mxUtils.setPrefixedStyle(h.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(h.style.backgroundColor=m.background);m.container.appendChild(h);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";h.appendChild(f);null!=n&&"1"!=urlParams.sketch? -this.sidebar.graph.pasteStyle(n,[d]):g.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var f=m.cloneCell(d);if(null!=c)c(f);else{f.geometry.x=m.snap(Math.round(a/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(b/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f); -m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(f))}null!=e&&e()})});for(f=0;f<(k?Math.min(l.length,4):l.length);f++)d(l[f]);l=h.offsetTop+h.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0l.length?35*l.length:140;h.className="geToolbarContainer geSidebarContainer";h.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ +mxPopupMenu.prototype.zIndex+1+";";g||mxUtils.setPrefixedStyle(h.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(h.style.backgroundColor=m.background);m.container.appendChild(h);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";h.appendChild(f);null!=n&&"1"!=urlParams.sketch? +this.sidebar.graph.pasteStyle(n,[d]):k.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var f=m.cloneCell(d);if(null!=c)c(f);else{f.geometry.x=m.snap(Math.round(a/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(b/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f); +m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(f))}null!=e&&e()})});for(f=0;f<(g?Math.min(l.length,4):l.length);f++)d(l[f]);l=h.offsetTop+h.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0d&&(b=a.substring(d,c+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(f){}return b}; EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){if(null!=b){var c=decodeURIComponent(b);this.isCompatibleString(c)&&(b=c)}a(b)}),"text")}),"html")}; EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(d){if(null!=d&&0':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0this.maxTooltipWidth||c>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/c))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject; -b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,m?null:this.editorUi.editor.graph.defaultVertexStyle,m?null:this.editorUi.editor.graph.defaultEdgeStyle,m,!0);this.graph2.addCells(b);mxClient.NO_FO=e;m=this.graph2.getGraphBounds();k&&0d||m.height>c)?(d=Math.round(100*Math.min(d/m.width,c/m.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/m.width,this.maxTooltipHeight/m.height))/100),m=this.graph2.getGraphBounds()): -(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+d+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",m.width*=d,m.height*=d)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");d=m.width+2*this.tooltipBorder+4;c=m.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=d+"px";k=d;this.tooltipTitles&&null!=f&&0d&&(this.tooltip.style.width=k+"px");this.tooltip.style.height=c+"px";f=-Math.round(m.x-this.tooltipBorder)+(k>d?(k-d)/2:0);d=-Math.round(m.y-this.tooltipBorder);l=null!=l?l:this.getTooltipOffset(a,m);a=l.x;l=l.y;mxClient.IS_SVG?0!=f||0!=d?this.graph2.view.canvas.setAttribute("transform", +"click",mxUtils.bind(this,function(a){this.hideTooltip();mxEvent.consume(a)})));this.tooltipCloseImage.style.display=k?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!g&&(d>this.maxTooltipWidth||c>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/c))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject; +b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,m?null:this.editorUi.editor.graph.defaultVertexStyle,m?null:this.editorUi.editor.graph.defaultEdgeStyle,m,!0);this.graph2.addCells(b);mxClient.NO_FO=e;m=this.graph2.getGraphBounds();g&&0d||m.height>c)?(d=Math.round(100*Math.min(d/m.width,c/m.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/m.width,this.maxTooltipHeight/m.height))/100),m=this.graph2.getGraphBounds()): +(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+d+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",m.width*=d,m.height*=d)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");d=m.width+2*this.tooltipBorder+4;c=m.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=d+"px";g=d;this.tooltipTitles&&null!=f&&0d&&(this.tooltip.style.width=g+"px");this.tooltip.style.height=c+"px";f=-Math.round(m.x-this.tooltipBorder)+(g>d?(g-d)/2:0);d=-Math.round(m.y-this.tooltipBorder);l=null!=l?l:this.getTooltipOffset(a,m);a=l.x;l=l.y;mxClient.IS_SVG?0!=f||0!=d?this.graph2.view.canvas.setAttribute("transform", "translate("+f+","+d+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=f+"px",this.graph2.view.drawPane.style.top=d+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=l+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()}; Sidebar.prototype.showTooltip=function(a,b,d,c,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var l=mxUtils.bind(this,function(){this.createTooltip(a,b,d,c,f,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?l():this.thread=window.setTimeout(l,this.tooltipDelay);this.currentElt=a}}; Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,d,c,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,b,d,c)}))}; @@ -2633,18 +2633,18 @@ Sidebar.prototype.addEntries=function(a){for(var b=0;bHeading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;", @@ -2753,37 +2753,37 @@ a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new 0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;", 160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;", 160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,f);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b}; -Sidebar.prototype.createThumb=function(a,b,d,c,f,e,l){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var k=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(k,Math.floor((b-a.width*k)/2/k-a.x),Math.floor((d-a.height*k)/2/k-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG|| -mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(k=this.graph.container.cloneNode(!1),k.innerHTML=this.graph.container.innerHTML):k=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;k.style.position="relative";k.style.overflow="hidden";k.style.left=this.thumbBorder+"px";k.style.top=this.thumbBorder+"px";k.style.width=b+"px";k.style.height=d+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";c.appendChild(k); +Sidebar.prototype.createThumb=function(a,b,d,c,f,e,l){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var g=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((b-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG|| +mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(g=this.graph.container.cloneNode(!1),g.innerHTML=this.graph.container.innerHTML):g=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;g.style.position="relative";g.style.overflow="hidden";g.style.left=this.thumbBorder+"px";g.style.top=this.thumbBorder+"px";g.style.width=b+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";c.appendChild(g); this.sidebarTitles&&null!=f&&0!=l&&(c.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,f),c.appendChild(b));return a}; Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})}; -Sidebar.prototype.createItem=function(a,b,d,c,f,e,l,k){k=null!=k?k:!0;var h=document.createElement("a");h.className="geItem";h.style.overflow="hidden";var g=2*this.thumbBorder;h.style.width=this.thumbWidth+g+"px";h.style.height=this.thumbHeight+g+"px";h.style.padding=this.thumbPadding+"px";mxEvent.addListener(h,"click",function(a){mxEvent.consume(a)});g=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(g,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle, -!0,!0);this.createThumb(g,this.thumbWidth,this.thumbHeight,h,b,d,c,f,e);var m=new mxRectangle(0,0,f,e);1R&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Z,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style, @@ -2801,44 +2801,44 @@ f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=x&&K==z?null:mxDragSource arguments);for(var a=[J,L,z,F,H,C,E],b=0;bl||Math.abs(k.y-mxEvent.getClientY(b))> -l)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));f.apply(this,arguments)};b.mouseUp=function(c){try{mxEvent.isPopupTrigger(c)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||h.itemClicked(d,b,c,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),k=null,h.currentElt=a}catch(m){b.reset(),h.editorUi.handleError(m)}}}; -Sidebar.prototype.createVertexTemplateEntry=function(a,b,d,c,f,e,l,k){null!=k&&null!=f&&(k+=" "+f);k=null!=k&&0l||Math.abs(g.y-mxEvent.getClientY(b))> +l)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));f.apply(this,arguments)};b.mouseUp=function(c){try{mxEvent.isPopupTrigger(c)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||h.itemClicked(d,b,c,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),g=null,h.currentElt=a}catch(m){b.reset(),h.editorUi.handleError(m)}}}; +Sidebar.prototype.createVertexTemplateEntry=function(a,b,d,c,f,e,l,g){null!=g&&null!=f&&(g+=" "+f);g=null!=g&&0mxUtils.indexOf(f,b)){d=this.getTagsForStencil(a,b);var g=null!=k?k[b]:null;null!=g&&d.push(g);m.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+c,Math.round(e*l),Math.round(h*l),"",b.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}), +Sidebar.prototype.addStencilPalette=function(a,b,d,c,f,e,l,g,h,k){l=null!=l?l:1;if(this.addStencilsToIndex){var m=[];if(null!=h)for(k=0;kmxUtils.indexOf(f,b)){d=this.getTagsForStencil(a,b);var k=null!=g?g[b]:null;null!=k&&d.push(k);m.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+c,Math.round(e*l),Math.round(h*l),"",b.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}), !0,!0);this.addPaletteFunctions(a,b,!1,m)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(a){null==c&&(c="");null!=e&&e.call(this,a);if(null!=h)for(var b=0;bmxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+b+d.toLowerCase()+c,Math.round(h*l),Math.round(g*l),"",d.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var c=0;ce||Math.abs(l.y- -b.getGraphY())>e){var f=this.selectionCellsHandler.getHandler(c.cell);null==f&&this.model.isEdge(c.cell)&&(f=this.createHandler(c));if(null!=f&&null!=f.bends&&0e||Math.abs(l.y- +b.getGraphY())>e){var f=this.selectionCellsHandler.getHandler(c.cell);null==f&&this.model.isEdge(c.cell)&&(f=this.createHandler(c));if(null!=f&&null!=f.bends&&0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0f&&"%"==b.charAt(match.index-1))l=e.substring(1);else{var k=e.substring(1,e.length-1);if("id"==k)l=a.id;else if(0>k.indexOf("{"))for(var h=a;null==l&&null!=h;)null!=h.value&&"object"==typeof h.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=h.getAttribute(k+"_"+Graph.diagramLanguage)), -null==l&&(l=h.hasAttribute(k)?null!=h.getAttribute(k)?h.getAttribute(k):"":null)),h=this.model.getParent(h);null==l&&(l=this.getGlobalVariable(k));null==l&&null!=d&&(l=d[k])}c.push(b.substring(f,match.index)+(null!=l?l:e));f=match.index+e.length}}c.push(b.substring(f))}return c.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0f&&"%"==b.charAt(match.index-1))l=e.substring(1);else{var g=e.substring(1,e.length-1);if("id"==g)l=a.id;else if(0>g.indexOf("{"))for(var h=a;null==l&&null!=h;)null!=h.value&&"object"==typeof h.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=h.getAttribute(g+"_"+Graph.diagramLanguage)), +null==l&&(l=h.hasAttribute(g)?null!=h.getAttribute(g)?h.getAttribute(g):"":null)),h=this.model.getParent(h);null==l&&(l=this.getGlobalVariable(g));null==l&&null!=d&&(l=d[g])}c.push(b.substring(f,match.index)+(null!=l?l:e));f=match.index+e.length}}c.push(b.substring(f))}return c.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox, b,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,c,f){a=this.cloneCell(a);for(var e=0;ef||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-h.x)>f||Math.abs(m.y-h.y)>f)&&(Math.abs(m.x-G.x)>f||Math.abs(m.y-G.y)>f)&&(Math.abs(m.x-z.x)>f||Math.abs(m.y-z.y)>f)){z=m.x-k.x;G=m.y-k.y;m={distSq:z*z+G*G,x:m.x,y:m.y};for(z=0;zm.distSq){l.splice(z,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(C=0;Cf||Math.abs(m.y-g.y)>f)&&(Math.abs(m.x-k.x)>f||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-G.x)>f||Math.abs(m.y-G.y)>f)&&(Math.abs(m.x-z.x)>f||Math.abs(m.y-z.y)>f)){z=m.x-g.x;G=m.y-g.y;m={distSq:z*z+G*G,x:m.x,y:m.y};for(z=0;zm.distSq){l.splice(z,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(C=0;Cf*f&&0f*f&&(z=new mxPoint(E.x-n.x,E.y-n.y),C=new mxPoint(E.x+n.x,E.y+n.y),m.push(z),this.addPoints(a,m,c,d,!1,null,h),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,h=!1,"sharp"==g?(a.lineTo(z.x-n.y*m,z.y+n.x*m),a.lineTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x,C.y)):"line"==g?(a.moveTo(z.x+n.y*m,z.y-n.x*m),a.lineTo(z.x-n.y*m,z.y+n.x*m),a.moveTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x+n.y* -m,C.y-n.x*m),a.moveTo(C.x,C.y)):"arc"==g?(m*=1.3,a.curveTo(z.x-n.y*m,z.y+n.x*m,C.x-n.y*m,C.y+n.x*m,C.x,C.y)):(a.moveTo(C.x,C.y),h=!0),m=[C],z=!0))}else n=null;z||(m.push(E),k=E)}this.addPoints(a,m,c,d,!1,null,h);a.stroke()}};var l=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):l.apply(this,arguments)};var k=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)k.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),h=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var m=Math.cos(-g),l=Math.sin(-g),e=mxUtils.getRotatedPoint(e,m,l,h);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);m+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,m);0!=g&&(m=Math.cos(g),l=Math.sin(g),e=mxUtils.getRotatedPoint(e,m,l,h));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;ff*f&&0f*f&&(z=new mxPoint(E.x-n.x,E.y-n.y),C=new mxPoint(E.x+n.x,E.y+n.y),m.push(z),this.addPoints(a,m,c,d,!1,null,k),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,k=!1,"sharp"==h?(a.lineTo(z.x-n.y*m,z.y+n.x*m),a.lineTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x,C.y)):"line"==h?(a.moveTo(z.x+n.y*m,z.y-n.x*m),a.lineTo(z.x-n.y*m,z.y+n.x*m),a.moveTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x+n.y* +m,C.y-n.x*m),a.moveTo(C.x,C.y)):"arc"==h?(m*=1.3,a.curveTo(z.x-n.y*m,z.y+n.x*m,C.x-n.y*m,C.y+n.x*m,C.x,C.y)):(a.moveTo(C.x,C.y),k=!0),m=[C],z=!0))}else n=null;z||(m.push(E),g=E)}this.addPoints(a,m,c,d,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):l.apply(this,arguments)};var g=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)g.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var m=Math.cos(-h),l=Math.sin(-h),e=mxUtils.getRotatedPoint(e,m,l,k);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);m+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==h&&f,m);0!=h&&(m=Math.cos(h),l=Math.sin(h),e=mxUtils.getRotatedPoint(e,m,l,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f=e.getStatus()&&eval.call(window,e.getText())}}catch(l){null!=window.console&&console.log("error in getStencil:",a,d,b,f,l)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; @@ -3040,7 +3041,7 @@ mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"stri mxStencilRegistry.loadStencilSet=function(a,b,d,c){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,e=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(l){null!=window.console&&console.log("error in loadStencilSet:",a,l)}null!=f&&null!= f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,b,e)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b=l.x&&this.model.remove(Q[b]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW, -mxConstants.NONE,[a]);var n=this.model.getTerminal(c,!1);if(null!=n){var T=this.getCurrentCellStyle(n);null!=T&&"1"==T.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)g.apply(this,arguments); -else{var d=this.getSelectionCell(),e=null,f=[],h=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(f.push(b),b==d)e=f.length-1;else if(a&&null==d&&0e||!a&&0e||!a&&0q)for(X=0;X>q;X--)this.model.remove(p[p.length+ -X-1]);p=this.model.getChildCells(a[k],!0);for(X=0;XmxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var g=this.model.getChildCells(f,!0),h=0,k=0;k< -g.length;k++)0<=mxUtils.indexOf(a,g[k])&&h++;h==g.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b,c){c=null!=c?c:new Graph;for(var d=0;dq)for(X=0;X>q;X--)this.model.remove(p[p.length+ +X-1]);p=this.model.getChildCells(a[g],!0);for(X=0;XmxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var h=this.model.getChildCells(f,!0),k=0,g=0;g< +h.length;g++)0<=mxUtils.indexOf(a,h[g])&&k++;k==h.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b,c){c=null!=c?c:new Graph;for(var d=0;dg||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()|| (this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& @@ -3244,41 +3245,41 @@ Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.c Format.prototype.init=function(){var a=this.editorUi,b=a.editor,d=b.graph;this.update=mxUtils.bind(this,function(a,b){this.refresh()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.update);d.getModel().addListener(mxEvent.CHANGE,this.update);d.addListener(mxEvent.EDITING_STARTED,this.update);d.addListener(mxEvent.EDITING_STOPPED,this.update);d.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);d.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged", this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a=e.length||a[g]!=e[g].node||a[g]==e[g].node&&a[g].getAttribute("color")!=e[g].color){e=a[g].firstChild;if(null!=e&&"A"==e.nodeName&&null==e.nextSibling&&null!= -e.firstChild){a[g].parentNode.insertBefore(e,a[g]);for(b=e.firstChild;null!=b;){var k=b.nextSibling;a[g].appendChild(b);b=k}e.appendChild(a[g])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[a],"cells",f.cells))},null!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:c.shapeForegroundColor,{install:function(a){aa=a},destroy:function(){aa=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"), -mxConstants.STYLE_FONTCOLOR,"default",function(a){ma.style.display=a==mxConstants.NONE?"none":"";oa.style.display=ma.style.display},function(a){a==mxConstants.NONE?c.setCellStyles(mxConstants.STYLE_NOLABEL,"1",f.cells):c.setCellStyles(mxConstants.STYLE_NOLABEL,null,f.cells);c.setCellStyles(mxConstants.STYLE_FONTCOLOR,a,f.cells);c.updateLabelElements(f.cells,function(a){a.removeAttribute("color");a.style.color=null})},c.shapeForegroundColor);k.style.fontWeight="bold";l.appendChild(k);l.appendChild(ma); -c.cellEditor.isContentEditing()||l.appendChild(oa);a.appendChild(l);l=this.createPanel();l.style.paddingTop="2px";l.style.paddingBottom="4px";k=c.filterSelectionCells(mxUtils.bind(this,function(a){var b=c.view.getState(a);return null==b||c.isAutoSizeState(b)||c.getModel().isEdge(a)||!c.isTableRow(a)&&!c.isTableCell(a)&&!c.isCellResizable(a)}));n=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);n.style.fontWeight="bold";0"+c.cellEditor.textarea.innerHTML+"

"),d=c.cellEditor.textarea.firstChild);null!=d&&null!=c.cellEditor.textarea&&d!=c.cellEditor.textarea&&c.cellEditor.textarea.contains(d)&&(d.style.lineHeight=b/100);a.value=b+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==c.cellEditor.textarea&&(da=c.cellEditor.saveSelection())}); -mxEvent.addListener(a,"touchstart",function(){document.activeElement==c.cellEditor.textarea&&(da=c.cellEditor.saveSelection())});a.value="120 %"}));l=e.cloneNode(!1);l.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],l,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},l),this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-table",mxResources.get("table"), -!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(k);this.styleButtons(n);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(l);a.appendChild(k);k=e.cloneNode(!1);k.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z, -null!=G?G.cellIndex:0)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z,null!=G?G.cellIndex+1:-1)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=G&&c.deleteColumn(z,G.cellIndex)}catch(U){this.editorUi.handleError(U)}}), -k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex+1)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), -mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.deleteRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),k)];this.styleButtons(n);n[2].style.marginRight="10px";l=this.createPanel();l.style.paddingTop="10px";l.style.paddingBottom="10px";l.appendChild(this.createTitle(mxResources.get("table")));l.appendChild(k);e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!= +mxEvent.addListener(a,"touchstart",function(){document.activeElement==c.cellEditor.textarea&&(da=c.cellEditor.saveSelection())});a.value="120 %"}));l=e.cloneNode(!1);l.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],l,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},l),this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-table",mxResources.get("table"), +!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(l);a.appendChild(g);g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z, +null!=G?G.cellIndex:0)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z,null!=G?G.cellIndex+1:-1)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=G&&c.deleteColumn(z,G.cellIndex)}catch(U){this.editorUi.handleError(U)}}), +g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex+1)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), +mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.deleteRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),g)];this.styleButtons(n);n[2].style.marginRight="10px";l=this.createPanel();l.style.paddingTop="10px";l.style.paddingBottom="10px";l.appendChild(this.createTitle(mxResources.get("table")));l.appendChild(g);e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!= z){var b=z.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var d=null==G||null!=a&&mxEvent.isShiftDown(a)?z:G;c.processElements(d,function(a){a.style.border=null});null==b||b==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=""):(d.setAttribute("border", "1"),d.style.border="1px solid "+b,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=z){var b=z.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var d=null==G||null!= a&&mxEvent.isShiftDown(a)?z:G;c.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=z){var a=z.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(b){if(null!=c.getParentByName(a,b,c.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==b)return!0;return!1},k=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},m=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&& -"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},l=mxUtils.getCurrentStyle(a),n=k(l),p=m(n,l,a),t=a.getElementsByTagName("*");if(0b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(b){if(null!=c.getParentByName(a,b,c.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==b)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},m=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&& +"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},l=mxUtils.getCurrentStyle(a),n=g(l),p=m(n,l,a),t=a.getElementsByTagName("*");if(0H&&(g=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity= +0;qH&&(k=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity= "1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})},p=document.createElement("div"),p.style.position="absolute",p.style.left="0px",p.style.top="0px",p.style.bottom="0px",p.style.width="24px",p.style.height="24px",p.style.margin="0px",p.style.cursor="pointer",p.style.opacity="0.5",p.style.backgroundRepeat="no-repeat",p.style.backgroundPosition="center center",p.style.backgroundSize="24px 24px",p.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(p.style.filter= -"invert(100%)"),q=p.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",h.appendChild(p),h.appendChild(q),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage-1,H))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage+1,H))})),g(p),g(q))}else E();return a}; +"invert(100%)"),q=p.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",h.appendChild(p),h.appendChild(q),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage-1,H))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage+1,H))})),k(p),k(q))}else E();return a}; DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0; DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))}; DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return d.pageVisible},function(a){b.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(d.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})); @@ -3495,19 +3496,19 @@ a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){r {install:function(a){this.listener=function(){a(d.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a}; DiagramFormatPanel.prototype.addGridOption=function(a){function b(a){var b=d.isFloatUnit()?parseFloat(e.value):parseInt(e.value),b=d.fromUnit(Math.max(d.inUnit(1),isNaN(b)?d.inUnit(10):b));b!=f.getGridSize()&&(mxGraph.prototype.gridSize=b,f.setGridSize(b));e.value=d.inUnit(b)+" "+d.getUnit();mxEvent.consume(a)}var d=this,c=this.editorUi,f=c.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="48px";e.style.marginTop="-2px";e.style.height= "21px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";e.style.boxSizing="border-box";e.value=this.inUnit(f.getGridSize())+" "+this.getUnit();var l=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=f.isGridEnabled()?"":"none";l.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(a){13==a.keyCode?(f.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(e.value=f.getGridSize(),f.container.focus(),mxEvent.consume(a))}); -mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";l.style.marginTop="-17px";l.style.right="66px";var k=this.createColorOption(mxResources.get("grid"),function(){var a=f.view.gridColor;return f.isGridEnabled()?a:null},function(a){var b=f.isGridEnabled();a==mxConstants.NONE?f.setGridEnabled(!1):(f.setGridEnabled(!0),c.setGridColor(a));e.style.display=f.isGridEnabled()?"":"none";l.style.display=e.style.display;b!=f.isGridEnabled()&&(f.defaultGridEnabled=f.isGridEnabled(), -c.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?f.view.defaultDarkGridColor:f.view.defaultGridColor,{install:function(a){this.listener=function(){a(f.isGridEnabled()?f.view.gridColor:null)};c.addListener("gridColorChanged",this.listener);c.addListener("gridEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});k.appendChild(e);k.appendChild(l);a.appendChild(k)}; +mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";l.style.marginTop="-17px";l.style.right="66px";var g=this.createColorOption(mxResources.get("grid"),function(){var a=f.view.gridColor;return f.isGridEnabled()?a:null},function(a){var b=f.isGridEnabled();a==mxConstants.NONE?f.setGridEnabled(!1):(f.setGridEnabled(!0),c.setGridColor(a));e.style.display=f.isGridEnabled()?"":"none";l.style.display=e.style.display;b!=f.isGridEnabled()&&(f.defaultGridEnabled=f.isGridEnabled(), +c.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?f.view.defaultDarkGridColor:f.view.defaultGridColor,{install:function(a){this.listener=function(){a(f.isGridEnabled()?f.view.gridColor:null)};c.addListener("gridColorChanged",this.listener);c.addListener("gridEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});g.appendChild(e);g.appendChild(l);a.appendChild(g)}; DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a}; DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var c=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(b,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(c.widthInput,function(){c.set(d.pageFormat)});this.addKeyHandler(c.heightInput, function(){c.set(d.pageFormat)});var f=function(){c.set(d.pageFormat)};b.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){b.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a}; -DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(a,b,c){mxShape.call(this);this.line=a;this.stroke=b;this.strokewidth=null!=c?c:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function d(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function l(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function n(){mxShape.call(this)} +DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(a,b,c){mxShape.call(this);this.line=a;this.stroke=b;this.strokewidth=null!=c?c:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function d(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function l(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxShape.call(this)}function n(){mxShape.call(this)} function p(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}function q(){mxActor.call(this)}function r(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function t(){mxActor.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function F(){mxActor.call(this)}function H(){mxActor.call(this)}function C(){mxActor.call(this)}function E(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,E.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,E.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,E.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,E.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,E.prototype.curveTo); this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,E.prototype.arcTo)}function z(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function J(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function ba(){mxCylinder.call(this)}function Y(){mxShape.call(this)}function N(){mxShape.call(this)}function R(){mxEllipse.call(this)}function V(){mxShape.call(this)} function Z(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function ma(){mxShape.call(this)}function oa(){mxShape.call(this)}function ta(){mxShape.call(this)}function qa(){mxShape.call(this)}function fa(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function va(){mxRectangleShape.call(this)}function na(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function la(){mxArrowConnector.call(this);this.spacing=0}function ha(){mxArrowConnector.call(this); this.spacing=0}function ia(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxActor.call(this)}function U(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function X(){mxActor.call(this)}function ga(){mxActor.call(this)}function sa(){mxActor.call(this)}function Ba(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)} function Ma(){mxRhombus.call(this)}function Na(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function Ga(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function za(){mxActor.call(this)}function Aa(){mxActor.call(this)}function O(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)} -function Ra(a,b,c,d,e,f,g,k,h,m){g+=h;var v=d.clone();d.x-=e*(2*g+h);d.y-=f*(2*g+h);e*=g+h;f*=g+h;return function(){a.ellipse(v.x-e-g,v.y-f-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var a=null;if(null!=this.line)for(var b=0;bv?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f), -a.end(),a.stroke())};mxCellRenderer.registerShape("note",h);mxUtils.extend(g,h);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, +a.end(),a.stroke())};mxCellRenderer.registerShape("note",h);mxUtils.extend(k,h);mxCellRenderer.registerShape("note2",k);k.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, "isoAngle",this.isoAngle))))*Math.PI/200,f=Math.min(d*Math.tan(f),.5*e);a.translate(b,c);a.begin();a.moveTo(.5*d,0);a.lineTo(d,f);a.lineTo(d,e-f);a.lineTo(.5*d,e);a.lineTo(0,e-f);a.lineTo(0,f);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,f);a.lineTo(.5*d,2*f);a.lineTo(d,f);a.moveTo(.5*d,2*f);a.lineTo(.5*d,e);a.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(n,mxShape);n.prototype.size=15;n.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(.5* e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.translate(b,c);0==f?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),a.moveTo(0,f),a.arcTo(.5*d,f,0,0,1,.5*d,0),a.arcTo(.5*d,f,0,0,1,d,f),a.lineTo(d,e-f),a.arcTo(.5*d,f,0,0,1,.5*d,e),a.arcTo(.5*d,f,0,0,1,0,e-f),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(d,f),a.arcTo(.5*d,f,0,0,1,.5*d,2*f),a.arcTo(.5*d,f,0,0,1,0,f),a.stroke())};mxCellRenderer.registerShape("cylinder2",n);mxUtils.extend(p,mxCylinder);p.prototype.size= 15;p.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),v=mxUtils.getValue(this.style,"lid",!0);a.translate(b,c);0==f?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),v?(a.moveTo(0,f),a.arcTo(.5*d,f,0,0,1,.5*d,0),a.arcTo(.5*d,f,0,0,1,d,f)):(a.moveTo(0,0),a.arcTo(.5*d,f,0,0,0,.5*d,f),a.arcTo(.5*d,f,0,0,0,d,0)),a.lineTo(d,e-f),a.arcTo(.5*d,f,0,0,1,.5*d,e),a.arcTo(.5*d,f,0,0,1,0,e-f),a.close(),a.fillAndStroke(),a.setShadow(!1), v&&(a.begin(),a.moveTo(d,f),a.arcTo(.5*d,f,0,0,1,.5*d,2*f),a.arcTo(.5*d,f,0,0,1,0,f),a.stroke()))};mxCellRenderer.registerShape("cylinder3",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(r,mxCylinder);r.prototype.tabWidth=60;r.prototype.tabHeight=20;r.prototype.tabPosition="right";r.prototype.arcSize=.1; -r.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),v=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(d,e)); -k=Math.min(k,.5*d,.5*(e-c));b=Math.max(b,k);b=Math.min(d-k,b);v||(k=0);a.begin();"left"==f?(a.moveTo(Math.max(k,0),c),a.lineTo(Math.max(k,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(k,0),0),a.lineTo(d-Math.max(k,0),c));v?(a.moveTo(0,k+c),a.arcTo(k,k,0,0,1,k,c),a.lineTo(d-k,c),a.arcTo(k,k,0,0,1,d,k+c),a.lineTo(d,e-k),a.arcTo(k,k,0,0,1,d-k,e),a.lineTo(k,e),a.arcTo(k,k,0,0,1,0,e-k)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke(); +r.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),v=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(h*=Math.min(d,e)); +h=Math.min(h,.5*d,.5*(e-c));b=Math.max(b,h);b=Math.min(d-h,b);v||(h=0);a.begin();"left"==f?(a.moveTo(Math.max(h,0),c),a.lineTo(Math.max(h,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(h,0),0),a.lineTo(d-Math.max(h,0),c));v?(a.moveTo(0,h+c),a.arcTo(h,h,0,0,1,h,c),a.lineTo(d-h,c),a.arcTo(h,h,0,0,1,d,h+c),a.lineTo(d,e-h),a.arcTo(h,h,0,0,1,d-h,e),a.lineTo(h,e),a.arcTo(h,h,0,0,1,0,e-h)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke(); a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(a.begin(),a.moveTo(d-30,c+20),a.lineTo(d-20,c+10),a.lineTo(d-10,c+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",r);r.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style, "tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(a.width,a.height));f=Math.min(f,.5*a.width,.5*(a.height-b));d||(f=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(f,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,f,Math.min(a.height,a.height- b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);var f=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1);b=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));c=mxUtils.getValue(this.style,"umlStateConnection",null);v||(b*=Math.min(d,e));b=Math.min(b,.5*d,.5*e);f||(b=0);f=0;null!=c&&(f=10);a.begin();a.moveTo(f, @@ -3538,14 +3539,14 @@ d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b 0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",x);var Za=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Za.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style, "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(b/=2);return new mxRectangle(0,Math.min(a.height*this.scale,2*b*this.scale),0,Math.max(0,.3*b*this.scale))}return null};r.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(a.width,a.height));f=Math.min(f,.5*a.width,.5*(a.height-b));d||(f=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)? -new mxRectangle(f,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,f,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl", +new mxRectangle(f,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,f,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};k.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl", !1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,Math.max(0,b*this.scale))}return null};mxUtils.extend(y,mxActor);y.prototype.size=.2;y.prototype.fixedSize=20;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, "size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",y);mxUtils.extend(F,mxActor);F.prototype.size=.2;F.prototype.fixedSize=20;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",F);mxUtils.extend(H,mxActor);H.prototype.size=.5;H.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null); b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",H);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke); b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",C);E.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};E.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; E.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};E.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};E.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};E.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a- -this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var v=Math.round(f/10),g=this.defaultVariation;5>v&&(v=5,g/=3);for(var k=c(a-this.lastX)*d/v,c=c(b-this.lastY)*e/v,d=d/f,e=e/f,f=0;ff){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var v=Math.round(f/10),g=this.defaultVariation;5>v&&(v=5,g/=3);for(var h=c(a-this.lastX)*d/v,c=c(b-this.lastY)*e/v,d=d/f,e=e/f,f=0;fv+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style, -"fixedSize","0"),f=e?F.prototype.fixedSize:F.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+k-e,g),new mxPoint(v+k,g+h),new mxPoint(v,g+h),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_WEST? -(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+k,g),new mxPoint(v+k-e,g+h),new mxPoint(v+e,g+h),new mxPoint(v,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(v+k,g),new mxPoint(v+k,g+h),new mxPoint(v,g+h-e),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+k,g+e),new mxPoint(v+k,g+h-e),new mxPoint(v,g+h),new mxPoint(v, -g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.xv+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?L.prototype.fixedSize:L.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,k=a.width,h=a.height,m=a.getCenterX();a=a.getCenterY();b=null!= -b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+k-e,g),new mxPoint(v+k,a),new mxPoint(v+k-e,g+h),new mxPoint(v,g+h),new mxPoint(v+e,a),new mxPoint(v,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+k,g),new mxPoint(v+k-e,a),new mxPoint(v+ -k,g+h),new mxPoint(v+e,g+h),new mxPoint(v,a),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(m,g),new mxPoint(v+k,g+e),new mxPoint(v+k,g+h),new mxPoint(m,g+h-e),new mxPoint(v,g+h),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(m,g+e),new mxPoint(v+k,g),new mxPoint(v+k,g+h-e),new mxPoint(m,g+h),new mxPoint(v,g+h-e),new mxPoint(v,g)]);m=new mxPoint(m, -a);d&&(c.xv+k?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?M.prototype.fixedSize:M.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,k=a.width,h=a.height,m=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): -mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(v+k,g+e),new mxPoint(v+k,g+h-e),new mxPoint(m,g+h),new mxPoint(v,g+h-e),new mxPoint(v,g+e),new mxPoint(m,g)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+k-e,g),new mxPoint(v+k,a),new mxPoint(v+k-e,g+h),new mxPoint(v+e,g+h),new mxPoint(v,a),new mxPoint(v+e,g)]);m=new mxPoint(m, -a);d&&(c.xv+k?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(oa, +b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?y.prototype.fixedSize:y.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h,g+e),new mxPoint(v+ +h,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g)]):(e=e?Math.max(0,Math.min(.5*h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h,g),new mxPoint(v+h-e,g+k),new mxPoint(v,g+k),new mxPoint(v+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.xv+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style, +"fixedSize","0"),f=e?F.prototype.fixedSize:F.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h-e,g),new mxPoint(v+h,g+k),new mxPoint(v,g+k),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_WEST? +(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h,g),new mxPoint(v+h-e,g+k),new mxPoint(v+e,g+k),new mxPoint(v,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(v+h,g),new mxPoint(v+h,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h,g+e),new mxPoint(v+h,g+k-e),new mxPoint(v,g+k),new mxPoint(v, +g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.xv+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?L.prototype.fixedSize:L.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height,m=a.getCenterX();a=a.getCenterY();b=null!= +b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h-e,g),new mxPoint(v+h,a),new mxPoint(v+h-e,g+k),new mxPoint(v,g+k),new mxPoint(v+e,a),new mxPoint(v,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h,g),new mxPoint(v+h-e,a),new mxPoint(v+ +h,g+k),new mxPoint(v+e,g+k),new mxPoint(v,a),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(m,g),new mxPoint(v+h,g+e),new mxPoint(v+h,g+k),new mxPoint(m,g+k-e),new mxPoint(v,g+k),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(m,g+e),new mxPoint(v+h,g),new mxPoint(v+h,g+k-e),new mxPoint(m,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g)]);m=new mxPoint(m, +a);d&&(c.xv+h?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?M.prototype.fixedSize:M.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height,m=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): +mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(v+h,g+e),new mxPoint(v+h,g+k-e),new mxPoint(m,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g+e),new mxPoint(m,g)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h-e,g),new mxPoint(v+h,a),new mxPoint(v+h-e,g+k),new mxPoint(v+e,g+k),new mxPoint(v,a),new mxPoint(v+e,g)]);m=new mxPoint(m, +a);d&&(c.xv+h?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(oa, mxShape);oa.prototype.size=10;oa.prototype.inset=2;oa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+v);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-v,f/2);a.quadTo((d-f)/2-v,f+v,d/2,f+v);a.quadTo((d+f)/2+v,f+v,(d+f)/2+v,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",oa);mxUtils.extend(ta, mxShape);ta.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ta);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d, -e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=20;fa.prototype.jettyHeight=10;fa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=Math.min(b,e-b),k=Math.min(g+2*b,e-b);f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c, -k),a.lineTo(v,k),a.lineTo(v,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("module",fa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style, -"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c,k),a.lineTo(v,k),a.lineTo(v,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(va,mxRectangleShape);va.prototype.paintForeground= +e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=20;fa.prototype.jettyHeight=10;fa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=Math.min(b,e-b),h=Math.min(g+2*b,e-b);f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c, +h),a.lineTo(v,h),a.lineTo(v,h+b),a.lineTo(c,h+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("module",fa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style, +"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=.3*e-b/2,h=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c,h),a.lineTo(v,h),a.lineTo(v,h+b),a.lineTo(c,h+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(va,mxRectangleShape);va.prototype.paintForeground= function(a,b,c,d,e){var f=d/2,v=e/2,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+v),new mxPoint(b+f,c+e),new mxPoint(b,c+v)],this.isRounded,g,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",va);mxUtils.extend(na,mxDoubleEllipse);na.prototype.outerStroke=!0;na.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4, Math.min(d/5,e/5));0Math.abs(a-e.view.scale)&&b==e.view.translate.x&&d==e.view.translate.y&&c.actions.get(e.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){e.isEnabled()&&(e.isSelectionEmpty()?c.actions.get("smartFit").funct():e.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()})); window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(c.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=l;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=l;this.addAction("saveAs...",function(){c.saveFile(!0)},null, null,Editor.ctrlKey+"+Shift+S").isEnabled=l;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,240,!0,!0)}).isEnabled=l;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print", -Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=c.copyXml(),null!=a&&e.removeCells(a,!1)}catch(m){}null==a&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{c.copyXml()}catch(g){}try{mxClipboard.copy(e)}catch(g){c.handleError(g)}}, +Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=c.copyXml(),null!=a&&e.removeCells(a,!1)}catch(m){}null==a&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{c.copyXml()}catch(k){}try{mxClipboard.copy(e)}catch(k){c.handleError(k)}}, null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(c.readGraphModelFromClipboard(function(a){if(null!=a){e.getModel().beginUpdate();try{c.pasteXml(a,!0)}finally{e.getModel().endUpdate()}}else mxClipboard.paste(e)}),a=!0)}catch(m){}a||mxClipboard.paste(e)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function b(a){if(null!=a){for(var b=!0,c=0;c< -a.length&&b;c++)b=b&&e.model.isEdge(a[c]);var d=e.view.translate,c=e.view.scale,f=d.x,g=d.y,d=null;if(1==a.length&&b){var h=e.getCellGeometry(a[0]);null!=h&&(d=h.getTerminalPoint(!0))}d=null!=d?d:e.getBoundingBoxFromGeometry(a,b);null!=d&&(b=Math.round(e.snap(e.popupMenuHandler.triggerX/c-f)),c=Math.round(e.snap(e.popupMenuHandler.triggerY/c-g)),e.cellsMoved(a,b-d.x,c-d.y))}}function d(){e.getModel().beginUpdate();try{b(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){a= +a.length&&b;c++)b=b&&e.model.isEdge(a[c]);var d=e.view.translate,c=e.view.scale,f=d.x,g=d.y,d=null;if(1==a.length&&b){var k=e.getCellGeometry(a[0]);null!=k&&(d=k.getTerminalPoint(!0))}d=null!=d?d:e.getBoundingBoxFromGeometry(a,b);null!=d&&(b=Math.round(e.snap(e.popupMenuHandler.triggerX/c-f)),c=Math.round(e.snap(e.popupMenuHandler.triggerY/c-g)),e.cellsMoved(a,b-d.x,c-d.y))}}function d(){e.getModel().beginUpdate();try{b(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){a= !1;try{Editor.enableNativeCipboard&&(c.readGraphModelFromClipboard(function(a){if(null!=a){e.getModel().beginUpdate();try{b(c.pasteXml(a,!0))}finally{e.getModel().endUpdate()}}else d()}),a=!0)}catch(p){}a||d()}});this.addAction("copySize",function(){var a=e.getSelectionCell();e.isEnabled()&&null!=a&&e.getModel().isVertex(a)&&(a=e.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&& null!=c.copiedSize){e.getModel().beginUpdate();try{for(var a=e.getResizableCells(e.getSelectionCells()),b=0;b/g,"\n"));var k=document.createElement("div");k.innerHTML=e.sanitizeHtml(h);h=mxUtils.extractTextWithWhitespace(k.childNodes);e.cellLabelChanged(state.cell,h);e.setCellStyles("html",a,[b[d]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(e.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"
")),e.cellLabelChanged(state.cell,e.sanitizeHtml(h)),e.setCellStyles("html",a,[b[d]]))}c.fireEvent(new mxEventObject("styleChanged", +!0)})).isEnabled=l;this.addAction("link...",mxUtils.bind(this,function(){if(e.isEnabled())if(e.cellEditor.isContentEditing()){var a=e.getSelectedElement(),b=e.getParentByName(a,"A",e.cellEditor.textarea),d="";if(null==b&&null!=a&&null!=a.getElementsByTagName)for(var f=a.getElementsByTagName("a"),g=0;g/g,"\n"));var h=document.createElement("div");h.innerHTML=e.sanitizeHtml(g);g=mxUtils.extractTextWithWhitespace(h.childNodes);e.cellLabelChanged(state.cell,g);e.setCellStyles("html",a,[b[d]])}else"0"==f&&"1"==a&&(g=mxUtils.htmlEntities(e.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(g=g.replace(/\n/g,"
")),e.cellLabelChanged(state.cell,e.sanitizeHtml(g)),e.setCellStyles("html",a,[b[d]]))}c.fireEvent(new mxEventObject("styleChanged", "keys",["html"],"values",[null!=a?a:"0"],"cells",b))}finally{e.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=e.getView().getState(e.getSelectionCell()),b="wrap";e.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);e.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",b=e.getView().getState(e.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"), function(a){null!=a&&0"))}),d)}c(mxResources.get("normal"),"p");c("","h1").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 1

";c("","h2").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 2

";c("","h3").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 3

";c("","h4").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 4

";c("","h5").firstChild.nextSibling.innerHTML= '
'+mxResources.get("heading")+" 5
";c("","h6").firstChild.nextSibling.innerHTML='
'+mxResources.get("heading")+" 6
";c("","pre").firstChild.nextSibling.innerHTML='
'+mxResources.get("formatted")+"
";c("","blockquote").firstChild.nextSibling.innerHTML='
'+mxResources.get("blockquote")+"
"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(c,d){var e= [6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(a,b){return a-b}));for(var f=mxUtils.bind(this,function(c){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var d=b.cellEditor.textarea.getElementsByTagName("font"),e=0;emxUtils.indexOf(e,this.customFontSizes[h])&&(k(this.customFontSizes[h]),g++);0mxUtils.indexOf(e,this.customFontSizes[h])&&(g(this.customFontSizes[h]),k++);0"],d=0;d");for(var e=0;e
");c.push("")}c.push("");return c.join("")}function e(a){h=l.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=h){k=l.getParentByName(h,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,k.sectionRowIndex+c),c=Math.min(20,h.cellIndex+c),f=d.rows.length;f"],d=0;d");for(var e=0;e
");c.push("")}c.push("");return c.join("")}function e(a){h=l.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=h){g=l.getParentByName(h,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,g.sectionRowIndex+c),c=Math.min(20,h.cellIndex+c),f=d.rows.length;f';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=f+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width= +Toolbar.prototype.addDropDownArrow=function(a,b,d,c,f,e,l,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=c-(null!=l?l:32)+"px";a.innerHTML='
';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=f+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width= d-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}}; Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}}; Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,d=this.addMenu("",mxResources.get("style"),!0,"formatBlock");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.style.paddingRight="18px",d.getElementsByTagName("img")[0].style.right="1px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"), @@ -3935,63 +3936,62 @@ function(a){null==a||a==mxConstants.NONE?(f.removeAttribute("border"),f.style.bo ("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){f.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=a.addItem("",null,mxUtils.bind(this,function(){var a=f.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0e.div.clientHeight&&(e.div.style.width="40px"); -e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}l=!0;mxEvent.consume(k)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){l=this.currentElt!=a;b.preventDefault()}))}}; -Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,d,c){function f(){var b=l.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!= -b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),k(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var l=document.createElement("input");l.style.marginBottom="10px";mxClient.IS_IE&&(l.style.marginTop="10px",document.body.appendChild(l));var k=null!=d?d:this.createApplyFunction(); -this.init=function(){mxClient.IS_TOUCH||l.focus()};var h=new mxJSColor.color(l);h.pickerOnfocus=!1;h.showPicker();d=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";d.appendChild(mxJSColor.picker.box);var g=document.createElement("center"),m=mxUtils.bind(this,function(a,b,c,d){b=null!=b?b:12;var k=document.createElement("table");k.style.borderCollapse= -"collapse";k.setAttribute("cellspacing","0");k.style.marginBottom="20px";k.style.cellSpacing="0px";k.style.marginLeft="1px";var m=document.createElement("tbody");k.appendChild(m);for(var n=a.length/b,p=0;pe.div.clientHeight&&(e.div.style.width="40px");e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu(); +e.destroy()});var h=mxUtils.getOffset(a);e.popup(h.x,h.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a)}l=!0;mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){l=null==e||null==e.div||null==e.div.parentNode;a.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,d,c){function f(){var b=l.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!= +b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),g(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var l=document.createElement("input");l.style.marginBottom="10px";mxClient.IS_IE&&(l.style.marginTop="10px",document.body.appendChild(l));var g=null!=d?d:this.createApplyFunction(); +this.init=function(){mxClient.IS_TOUCH||l.focus()};var h=new mxJSColor.color(l);h.pickerOnfocus=!1;h.showPicker();d=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";d.appendChild(mxJSColor.picker.box);var k=document.createElement("center"),m=mxUtils.bind(this,function(a,b,c,d){b=null!=b?b:12;var g=document.createElement("table");g.style.borderCollapse= +"collapse";g.setAttribute("cellspacing","0");g.style.marginBottom="20px";g.style.cellSpacing="0px";g.style.marginLeft="1px";var m=document.createElement("tbody");g.appendChild(m);for(var n=a.length/b,p=0;p=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");b.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(d);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);d=document.createElement("a");d.setAttribute("href", -"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";b.appendChild(d);this.container=b},TextareaDialog=function(a,b,d,c,f,e,l,k,h,g,m,n,p,q,r){g=null!=g?g:!1;l=document.createElement("div");l.style.position="absolute";l.style.top="20px";l.style.bottom="20px";l.style.left="20px";l.style.right="20px";k=document.createElement("div"); -k.style.position="absolute";k.style.left="0px";k.style.right="0px";var u=k.cloneNode(!1),t=k.cloneNode(!1);k.style.top="0px";k.style.height="20px";u.style.top="20px";u.style.bottom="64px";t.style.bottom="0px";t.style.height="60px";t.style.textAlign="center";mxUtils.write(k,b);l.appendChild(k);l.appendChild(u);l.appendChild(t);null!=r&&k.appendChild(r);var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete", +"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";b.appendChild(d);this.container=b},TextareaDialog=function(a,b,d,c,f,e,l,g,h,k,m,n,p,q,r){k=null!=k?k:!1;l=document.createElement("div");l.style.position="absolute";l.style.top="20px";l.style.bottom="20px";l.style.left="20px";l.style.right="20px";g=document.createElement("div"); +g.style.position="absolute";g.style.left="0px";g.style.right="0px";var u=g.cloneNode(!1),t=g.cloneNode(!1);g.style.top="0px";g.style.height="20px";u.style.top="20px";u.style.bottom="64px";t.style.bottom="0px";t.style.height="60px";t.style.textAlign="center";mxUtils.write(g,b);l.appendChild(g);l.appendChild(u);l.appendChild(t);null!=r&&g.appendChild(r);var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete", "off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.outline="none";w.style.position="absolute";w.style.boxSizing="border-box";w.style.top="0px";w.style.left="0px";w.style.height="100%";w.style.width="100%";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};u.appendChild(w);null!=p&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),b.className="geBtn",t.appendChild(b));if(null!=q)for(b=0;bMAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var c=a.editor.graph,f=c.getGraphBounds(),e=c.view.scale,l=Math.ceil(f.width/ -e),k=Math.ceil(f.height/e),h,e=document.createElement("table"),g=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h,mxResources.get("filename")+":");f.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);f.appendChild(h); -g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");f.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value","png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h)); +e),g=Math.ceil(f.height/e),h,e=document.createElement("table"),k=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h,mxResources.get("filename")+":");f.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);f.appendChild(h); +k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");f.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value","png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h)); h=document.createElement("option");h.setAttribute("value","jpg");mxUtils.write(h,mxResources.get("formatJpg"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","pdf");mxUtils.write(h,mxResources.get("formatPdf"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","svg");mxUtils.write(h,mxResources.get("formatSvg"));n.appendChild(h);ExportDialog.showXmlOption&&(h=document.createElement("option"),h.setAttribute("value","xml"),mxUtils.write(h,mxResources.get("formatXml")), -n.appendChild(h));h=document.createElement("td");h.appendChild(n);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");f.appendChild(h);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td"); -h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");f.appendChild(h);var q=document.createElement("input");q.setAttribute("value",l);q.style.width="180px";h=document.createElement("td");h.appendChild(q);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");f.appendChild(h);var r=document.createElement("input");r.setAttribute("value",k);r.style.width="180px";h=document.createElement("td"); -h.appendChild(r);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("dpi")+":");f.appendChild(h);var u=document.createElement("select");u.style.width="180px";h=document.createElement("option");h.setAttribute("value","100");mxUtils.write(h,"100dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","200");mxUtils.write(h,"200dpi");u.appendChild(h);h=document.createElement("option"); +n.appendChild(h));h=document.createElement("td");h.appendChild(n);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");f.appendChild(h);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td"); +h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");f.appendChild(h);var q=document.createElement("input");q.setAttribute("value",l);q.style.width="180px";h=document.createElement("td");h.appendChild(q);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");f.appendChild(h);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";h=document.createElement("td"); +h.appendChild(r);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("dpi")+":");f.appendChild(h);var u=document.createElement("select");u.style.width="180px";h=document.createElement("option");h.setAttribute("value","100");mxUtils.write(h,"100dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","200");mxUtils.write(h,"200dpi");u.appendChild(h);h=document.createElement("option"); h.setAttribute("value","300");mxUtils.write(h,"300dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","400");mxUtils.write(h,"400dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","custom");mxUtils.write(h,mxResources.get("custom"));u.appendChild(h);var t=document.createElement("input");t.style.width="180px";t.style.display="none";t.setAttribute("value","100");t.setAttribute("type","number");t.setAttribute("min","50");t.setAttribute("step", -"50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):(t.value=this.value,w||(p.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",w||(p.value=a))});h=document.createElement("td");h.appendChild(u);h.appendChild(t);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize= -"10pt";mxUtils.write(h,mxResources.get("background")+":");f.appendChild(h);var x=document.createElement("input");x.setAttribute("type","checkbox");x.checked=null==c.background||c.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(x);mxUtils.write(h,mxResources.get("transparent"));f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("grid")+":");f.appendChild(h);var y=document.createElement("input"); -y.setAttribute("type","checkbox");y.checked=!1;h=document.createElement("td");h.appendChild(y);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");f.appendChild(h);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("value",ExportDialog.lastBorderValue);F.style.width="180px";h=document.createElement("td");h.appendChild(F);f.appendChild(h);g.appendChild(f); -e.appendChild(g);mxEvent.addListener(n,"change",b);b();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(F.value)), -g=c.background,h=Math.max(1,parseInt(t.value));if(("svg"==d||"png"==d||"pdf"==d)&&x.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,d,g,e,f,h,y.checked)}}));H.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(h.appendChild(C),h.appendChild(H)):(h.appendChild(H),h.appendChild(C));f.appendChild(h);g.appendChild(f);e.appendChild(g); +"50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):(t.value=this.value,w||(p.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",w||(p.value=a))});h=document.createElement("td");h.appendChild(u);h.appendChild(t);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize= +"10pt";mxUtils.write(h,mxResources.get("background")+":");f.appendChild(h);var x=document.createElement("input");x.setAttribute("type","checkbox");x.checked=null==c.background||c.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(x);mxUtils.write(h,mxResources.get("transparent"));f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("grid")+":");f.appendChild(h);var y=document.createElement("input"); +y.setAttribute("type","checkbox");y.checked=!1;h=document.createElement("td");h.appendChild(y);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");f.appendChild(h);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("value",ExportDialog.lastBorderValue);F.style.width="180px";h=document.createElement("td");h.appendChild(F);f.appendChild(h);k.appendChild(f); +e.appendChild(k);mxEvent.addListener(n,"change",b);b();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(F.value)), +g=c.background,h=Math.max(1,parseInt(t.value));if(("svg"==d||"png"==d||"pdf"==d)&&x.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,d,g,e,f,h,y.checked)}}));H.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(h.appendChild(C),h.appendChild(H)):(h.appendChild(H),h.appendChild(C));f.appendChild(h);k.appendChild(f);e.appendChild(k); this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; -ExportDialog.exportFile=function(a,b,d,c,f,e,l,k){k=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(k.getSvg(c,f,e)),b,d);else{var h=k.getGraphBounds(),g=mxUtils.createXmlDocument(),m=g.createElement("output");g.appendChild(m);g=new mxXmlCanvas2D(m);g.translate(Math.floor((e/f-h.x)/k.view.scale),Math.floor((e/f-h.y)/k.view.scale));g.scale(f/k.view.scale);(new mxImageExport).drawState(k.getView().getState(k.model.root), -g);m="xml="+encodeURIComponent(mxUtils.getXml(m));g=Math.ceil(h.width*f/k.view.scale+2*e);f=Math.ceil(h.height*f/k.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&g*fb.name?1:0});if(null!=r){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign= -"center";mxUtils.write(m,r);var x=g.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(c){mxEvent.isShiftDown(c)&&(c=new FilenameDialog(a,r,mxResources.get("apply"),mxUtils.bind(this,function(c){null!=c&&0b.name?1:0});if(null!=r){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign= +"center";mxUtils.write(m,r);var x=k.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(c){mxEvent.isShiftDown(c)&&(c=new FilenameDialog(a,r,mxResources.get("apply"),mxUtils.bind(this,function(c){null!=c&&0a.indexOf(":"))try{var b=mxUtils.indexOf(n,a);if(0<=b&&null!=p[b])p[b].focus();else{e.cloneNode(!1).setAttribute(a, -"");0<=b&&(n.splice(b,1),p.splice(b,1));n.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";p.push(c);u(c,a);c.focus()}F.setAttribute("disabled","disabled");y.value=""}catch(G){mxUtils.alert(G)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(y,"keypress",function(a){13==a.keyCode&&F.click()});this.init=function(){0")});mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=q&&h.addCell(c,h.model.root,q);q=p=null;a.stopPropagation();a.preventDefault()});var k=document.createElement("img"); k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 4px";k.style.marginTop="2px";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(h.model.isVisible(c)?"hide":"show"));h.model.isVisible(c)?(k.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(f,75)):(k.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(f,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");g.appendChild(k); mxEvent.addListener(k,"click",function(a){h.model.setVisible(c,!h.model.isVisible(c));mxEvent.consume(a)});k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 0";k.style.marginTop="2px";k.setAttribute("title",mxResources.get("lockUnlock"));var l=h.getCurrentCellStyle(c);"1"==mxUtils.getValue(l,"locked","0")?(k.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(k,75)):(k.setAttribute("src", @@ -4014,17 +4014,17 @@ b);k.style.display="block";k.style.whiteSpace="nowrap";k.style.overflow="hidden" "6px",0
')))}catch(M){}})(); (function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&& "1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35, mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,d,e,g,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& @@ -12037,17 +12037,17 @@ b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute(" "click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b); this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container, 640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;fmxUtils.indexOf(g,T)&&g.push(T),n.fireEvent(new mxEventObject("cellsInserted","cells",[T]))):n.fireEvent(new mxEventObject("cellsInserted","cells",[ga]));T=ga;if(!d)for(ca=0;camxUtils.indexOf(g,T)&&g.push(T),n.fireEvent(new mxEventObject("cellsInserted","cells",[T]))):n.fireEvent(new mxEventObject("cellsInserted","cells",[ga]));T=ga;if(!d)for(ca=0;camxUtils.indexOf(g,b)};this.executeLayout(function(){wa.execute(n.getDefaultParent());va()},!0,M);M=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&Q.length==2*g.length-1&&1==ba.length){n.view.validate();var Da=new mxCompactTreeLayout(n,"horizontaltree"==U);Da.levelDistance=W;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(n.getDefaultParent(), 0g.length){n.view.validate(); @@ -13155,12 +13155,12 @@ m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer. ")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ia()}),y=mxUtils.bind(this,function(){oa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",oa);m.addListener("editInlineStart",y);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",y);m.addListener("editInlineStop",mxUtils.bind(this, function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";U.style.visibility="hidden";C.style.visibility="hidden";B.style.display="none"}));if(null!=m.hoverIcons){var la=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||la.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this, arguments)+"sketch=0;"}}if("1"==urlParams.sketch){B.className="geToolbarContainer";C.className="geToolbarContainer";U.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=B;var V=!1;"1"!=urlParams.embed&&(mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"}),mxEvent.addListener(p,"mouseleave",function(){V||(m.statusContainer.style.display="none")}));var Z=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title", -b):m.notificationBtn.removeAttribute("title"))});p.style.visibility=20>p.clientWidth?"hidden":"";m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if("1"!=urlParams.embed)if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute? -m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();Z(b);var c=m.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(m.statusContainer.innerHTML='',m.statusContainer.style.display="inline-block",V=!0):6p.clientWidth&&!V?"hidden":""}));Q=e("diagram",null,Editor.menuImage);Q.style.boxShadow="none";Q.style.padding="6px";Q.style.margin="0px";U.appendChild(Q);mxEvent.disableContextMenu(Q);mxEvent.addGestureListeners(Q,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none"; -m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var P=document.createElement("a");P.style.padding="0px";P.style.boxShadow="none";P.className="geMenuItem";P.style.display="inline-block";P.style.width= -"40px";P.style.height="12px";P.style.marginBottom="-2px";P.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";P.style.backgroundPosition="top center";P.style.backgroundRepeat="no-repeat";P.setAttribute("title","Minimize");var ea=!1,Y=mxUtils.bind(this,function(){B.innerHTML="";if(!ea){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default"; -b.style.margin="2px 0px";B.appendChild(b);mxUtils.br(B);return b};c(m.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", +b):m.notificationBtn.removeAttribute("title"))});p.style.visibility=20>p.clientWidth?"hidden":"";m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if("1"!=urlParams.embed)if(m.statusContainer.style.display="inline-block",V=!0,1==m.statusContainer.children.length&&""==m.editor.getStatus())p.style.visibility="hidden";else{if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&"function"===typeof m.statusContainer.firstChild.getAttribute&& +null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();Z(b);var c=m.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(m.statusContainer.innerHTML='',m.statusContainer.style.display= +"inline-block",V=!0):6p.clientWidth&&!V?"hidden":""}}));Q=e("diagram",null,Editor.menuImage);Q.style.boxShadow="none";Q.style.padding="6px";Q.style.margin="0px";U.appendChild(Q);mxEvent.disableContextMenu(Q);mxEvent.addGestureListeners(Q,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)|| +mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display= +"inline-block";var P=document.createElement("a");P.style.padding="0px";P.style.boxShadow="none";P.className="geMenuItem";P.style.display="inline-block";P.style.width="40px";P.style.height="12px";P.style.marginBottom="-2px";P.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";P.style.backgroundPosition="top center";P.style.backgroundRepeat="no-repeat";P.setAttribute("title","Minimize");var ea=!1,Y=mxUtils.bind(this,function(){B.innerHTML="";if(!ea){var b=function(b,d,e){b=f("",b.funct, +null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";B.appendChild(b);mxUtils.br(B);return b};c(m.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", 140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));c(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"); b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=n.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0, 20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var d=m.actions.get("toggleShapes");b(d,mxResources.get("shapes")+" ("+d.shortcut+ diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index be8af5bce8..bc3e37aeee 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -13329,7 +13329,7 @@ while (index < lines.length && lines[index].charAt(0) == '#') { - var text = lines[index]; + var text = lines[index].replace(/\r$/,''); // Remove trailing \r if the file uses \r\n line breaks index++; while (index < lines.length && text.charAt(text.length - 1) == '\\' && @@ -13455,7 +13455,7 @@ } // Converts identity and parent to index and validates XML attribute names - var keys = this.editor.csvToArray(lines[index]); + var keys = this.editor.csvToArray(lines[index].replace(/\r$/,'')); var identityIndex = null; var parentIndex = null; var attribs = []; @@ -13497,7 +13497,7 @@ for (var i = index + 1; i < lines.length; i++) { - var values = this.editor.csvToArray(lines[i]); + var values = this.editor.csvToArray(lines[i].replace(/\r$/,'')); if (values == null) { diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.js index 214ee87af4..1594f8bd08 100644 --- a/src/main/webapp/js/diagramly/ElectronApp.js +++ b/src/main/webapp/js/diagramly/ElectronApp.js @@ -146,6 +146,21 @@ mxStencilRegistry.allowEval = false; } } + //Remove old relaxed CSP and add strict one + var allMeta = document.getElementsByTagName('meta'); + + for (var i = 0; i < allMeta.length; i++) + { + if (allMeta[i].getAttribute('http-equiv') == 'Content-Security-Policy') + { + allMeta[i].parentNode.removeChild(allMeta[i]); + } + + break; + } + + mxmeta(null, 'default-src \'self\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy'); + //Disable web plugins loading urlParams['plugins'] = '0'; origAppMain.apply(this, arguments); @@ -838,38 +853,36 @@ mxStencilRegistry.allowEval = false; path: file.fileObject.path, listener: mxUtils.bind(this, function(curr, prev) { + EditorUi.debug('EditorUi.watchFile', [this], + 'file', [file], 'stat', [file.stat], + 'curr', [curr], 'prev', [prev], + 'inConflictState', file.inConflictState, + 'unwatchedSaves', file.unwatchedSaves); + //File is changed (not just accessed) && File is not already in a conflict state if (curr.mtimeMs != prev.mtimeMs && !file.inConflictState) { //Ignore our own changes - if (file.unwatchedSaves || (file.state != null && file.stat.mtimeMs == curr.mtimeMs)) + if (file.unwatchedSaves || (file.stat != null && file.stat.mtimeMs == curr.mtimeMs)) { file.unwatchedSaves = false; return; } file.inConflictState = true; - - this.showError(mxResources.get('externalChanges'), - mxResources.get('fileChangedSyncDialog'), - mxResources.get('merge'), mxUtils.bind(this, function() + + file.addConflictStatus(mxUtils.bind(this, function() + { + file.ui.editor.setStatus(mxUtils.htmlEntities( + mxResources.get('updatingDocument'))); + file.synchronizeFile(mxUtils.bind(this, function() { - if (this.spinner.spin(document.body, mxResources.get('updatingDocument'))) - { - file.synchronizeFile(mxUtils.bind(this, function() - { - this.spinner.stop(); - }), mxUtils.bind(this, function(err) - { - file.handleFileError(err, true); - })); - } - }), null, null, null, - mxResources.get('cancel'), mxUtils.bind(this, function() + file.handleFileSuccess(false); + }), mxUtils.bind(this, function(err) { - this.hideDialog(); - file.handleFileError(null, false); - }), 340, 130); + file.handleFileError(err, true); + })); + })); } }) }); diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js index 12929074a2..5c65d13f22 100644 --- a/src/main/webapp/js/diagramly/Minimal.js +++ b/src/main/webapp/js/diagramly/Minimal.js @@ -2323,41 +2323,54 @@ EditorUi.initMinimalTheme = function() if (urlParams['embed'] != '1') { - if (ui.statusContainer.children.length == 0 || - (ui.statusContainer.children.length == 1 && - typeof ui.statusContainer.firstChild.getAttribute === 'function' && - ui.statusContainer.firstChild.getAttribute('class') == null)) + ui.statusContainer.style.display = 'inline-block'; + statusVisible = true; + + if (ui.statusContainer.children.length == 1 && + ui.editor.getStatus() == '') { - var title = (ui.statusContainer.firstChild != null && - typeof ui.statusContainer.firstChild.getAttribute === 'function') ? - ui.statusContainer.firstChild.getAttribute('title') : - ui.editor.getStatus(); - setNotificationTitle(title); - var file = ui.getCurrentFile(); - var key = (file != null) ? file.savingStatusKey : DrawioFile.prototype.savingStatusKey; - - if (title == mxResources.get(key) + '...') + menubar.style.visibility = 'hidden'; + } + else + { + if (ui.statusContainer.children.length == 0 || + (ui.statusContainer.children.length == 1 && + typeof ui.statusContainer.firstChild.getAttribute === 'function' && + ui.statusContainer.firstChild.getAttribute('class') == null)) + { + var title = (ui.statusContainer.firstChild != null && + typeof ui.statusContainer.firstChild.getAttribute === 'function') ? + ui.statusContainer.firstChild.getAttribute('title') : + ui.editor.getStatus(); + setNotificationTitle(title); + var file = ui.getCurrentFile(); + var key = (file != null) ? file.savingStatusKey : + DrawioFile.prototype.savingStatusKey; + + if (title == mxResources.get(key) + '...') + { + ui.statusContainer.innerHTML = ''; + ui.statusContainer.style.display = 'inline-block'; + statusVisible = true; + } + else if (ui.buttonContainer.clientWidth > 6) + { + ui.statusContainer.style.display = 'none'; + statusVisible = false; + } + } + else { - ui.statusContainer.innerHTML = ''; ui.statusContainer.style.display = 'inline-block'; + setNotificationTitle(null); statusVisible = true; } - else if (ui.buttonContainer.clientWidth > 6) - { - ui.statusContainer.style.display = 'none'; - statusVisible = false; - } - } - else - { - ui.statusContainer.style.display = 'inline-block'; - setNotificationTitle(null); - statusVisible = true; + + menubar.style.visibility = (menubar.clientWidth < 20 && + !statusVisible) ? 'hidden' : ''; } } - - menubar.style.visibility = (menubar.clientWidth < 20 && !statusVisible) ? 'hidden' : ''; })); elt = addMenu('diagram', null, Editor.menuImage); diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js index c4ea2ec015..4fa59b8ede 100644 --- a/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js +++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-ER.js @@ -65,16 +65,16 @@ return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'List'); }), - this.addEntry(dt + ' list', function() - { - return sb.createVertexTemplateFromCells([row.clone()], row.geometry.width, row.geometry.height, 'List Item 1'); + this.addEntry(dt + ' list', function() + { + return sb.createVertexTemplateFromCells([row.clone()], row.geometry.width, row.geometry.height, 'List Item 1'); }), - this.addEntry(dt + 'table row', function() - { + this.addEntry(dt + 'table row', function() + { var cell = new mxCell(row.value, new mxGeometry(0, 0, 90, row.geometry.height), 'shape=partialRectangle;fillColor=none;align=left;verticalAlign=middle;strokeColor=none;spacingLeft=34;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;'); - cell.vertex = true; + cell.vertex = true; - var cell1 = sb.cloneCell(row, ''); + var cell1 = sb.cloneCell(row, ''); cell1.connectable = false; cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;stokeWidth=1;dashed=1;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;' cell1.geometry.width = 30; @@ -82,8 +82,8 @@ return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'List Item 2'); }), - this.addEntry(dt + 'table row divider hline line separator', function() - { + this.addEntry(dt + 'table row divider hline line separator', function() + { var divider = new mxCell('', new mxGeometry(0, 0, 60, 10), 'line;strokeWidth=1;rotatable=0;dashed=0;labelPosition=right;align=left;verticalAlign=middle;spacingTop=0;spacingLeft=6;points=[];portConstraint=eastwest;'); divider.vertex = true; diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js index 6421d93eb3..3829d5f116 100644 --- a/src/main/webapp/js/grapheditor/EditorUi.js +++ b/src/main/webapp/js/grapheditor/EditorUi.js @@ -5417,134 +5417,136 @@ EditorUi.prototype.createKeyHandler = function(editor) { stepSize = (stepSize != null) ? stepSize : 1; - if (resize) + var cells = graph.getCompositeParents(graph.getSelectionCells()); + var cell = (cells.length > 0) ? cells[0] : null; + + if (cell != null) { - // Resizes all selected vertices - graph.getModel().beginUpdate(); - try + if (resize) { - var cells = graph.getSelectionCells(); - - for (var i = 0; i < cells.length; i++) + // Resizes all selected vertices + graph.getModel().beginUpdate(); + try { - if (graph.getModel().isVertex(cells[i]) && graph.isCellResizable(cells[i])) + for (var i = 0; i < cells.length; i++) { - var geo = graph.getCellGeometry(cells[i]); - - if (geo != null) + if (graph.getModel().isVertex(cells[i]) && graph.isCellResizable(cells[i])) { - geo = geo.clone(); + var geo = graph.getCellGeometry(cells[i]); - if (keyCode == 37) + if (geo != null) { - geo.width = Math.max(0, geo.width - stepSize); - } - else if (keyCode == 38) - { - geo.height = Math.max(0, geo.height - stepSize); - } - else if (keyCode == 39) - { - geo.width += stepSize; - } - else if (keyCode == 40) - { - geo.height += stepSize; + geo = geo.clone(); + + if (keyCode == 37) + { + geo.width = Math.max(0, geo.width - stepSize); + } + else if (keyCode == 38) + { + geo.height = Math.max(0, geo.height - stepSize); + } + else if (keyCode == 39) + { + geo.width += stepSize; + } + else if (keyCode == 40) + { + geo.height += stepSize; + } + + graph.getModel().setGeometry(cells[i], geo); } - - graph.getModel().setGeometry(cells[i], geo); } } } - } - finally - { - graph.getModel().endUpdate(); - } - } - else - { - // Moves vertices up/down in a stack layout - var cell = graph.getSelectionCell(); - var parent = graph.model.getParent(cell); - var scale = graph.getView().scale; - var layout = null; - - if (graph.getSelectionCount() == 1 && graph.model.isVertex(cell) && - graph.layoutManager != null && !graph.isCellLocked(cell)) - { - layout = graph.layoutManager.getLayout(parent); - } - - if (layout != null && layout.constructor == mxStackLayout) - { - var index = parent.getIndex(cell); - - if (keyCode == 37 || keyCode == 38) - { - graph.model.add(parent, cell, Math.max(0, index - 1)); - } - else if (keyCode == 39 ||keyCode == 40) + finally { - graph.model.add(parent, cell, Math.min(graph.model.getChildCount(parent), index + 1)); + graph.getModel().endUpdate(); } } else { - var handler = graph.graphHandler; + // Moves vertices up/down in a stack layout + var parent = graph.model.getParent(cell); + var scale = graph.getView().scale; + var layout = null; - if (handler != null) + if (graph.getSelectionCount() == 1 && graph.model.isVertex(cell) && + graph.layoutManager != null && !graph.isCellLocked(cell)) { - if (handler.first == null) + layout = graph.layoutManager.getLayout(parent); + } + + if (layout != null && layout.constructor == mxStackLayout) + { + var index = parent.getIndex(cell); + + if (keyCode == 37 || keyCode == 38) { - handler.start(graph.getSelectionCell(), - 0, 0, graph.getSelectionCells()); + graph.model.add(parent, cell, Math.max(0, index - 1)); } + else if (keyCode == 39 ||keyCode == 40) + { + graph.model.add(parent, cell, Math.min(graph.model.getChildCount(parent), index + 1)); + } + } + else + { + var handler = graph.graphHandler; - if (handler.first != null) + if (handler != null) { - var dx = 0; - var dy = 0; - - if (keyCode == 37) + if (handler.first == null) { - dx = -stepSize; + handler.start(cell, 0, 0, cells); } - else if (keyCode == 38) + + if (handler.first != null) { - dy = -stepSize; + var dx = 0; + var dy = 0; + + if (keyCode == 37) + { + dx = -stepSize; + } + else if (keyCode == 38) + { + dy = -stepSize; + } + else if (keyCode == 39) + { + dx = stepSize; + } + else if (keyCode == 40) + { + dy = stepSize; + } + + handler.currentDx += dx * scale; + handler.currentDy += dy * scale; + handler.checkPreview(); + handler.updatePreview(); } - else if (keyCode == 39) + + // Groups move steps in undoable change + if (thread != null) { - dx = stepSize; + window.clearTimeout(thread); } - else if (keyCode == 40) + + thread = window.setTimeout(function() { - dy = stepSize; - } - - handler.currentDx += dx * scale; - handler.currentDy += dy * scale; - handler.checkPreview(); - handler.updatePreview(); - } - - // Groups move steps in undoable change - if (thread != null) - { - window.clearTimeout(thread); + if (handler.first != null) + { + var dx = handler.roundLength(handler.currentDx / scale); + var dy = handler.roundLength(handler.currentDy / scale); + handler.moveCells(handler.cells, dx, dy); + handler.reset(); + } + }, 400); } - - thread = window.setTimeout(function() - { - if (handler.first != null) - { - var dx = handler.roundLength(handler.currentDx / scale); - var dy = handler.roundLength(handler.currentDy / scale); - handler.moveCells(handler.cells, dx, dy); - handler.reset(); - } - }, 400); } } } @@ -5553,8 +5555,7 @@ EditorUi.prototype.createKeyHandler = function(editor) // Overridden to handle special alt+shift+cursor keyboard shortcuts var directions = {37: mxConstants.DIRECTION_WEST, 38: mxConstants.DIRECTION_NORTH, - 39: mxConstants.DIRECTION_EAST, 40: mxConstants.DIRECTION_SOUTH}; - + 39: mxConstants.DIRECTION_EAST, 40: mxConstants.DIRECTION_SOUTH}; var keyHandlerGetFunction = keyHandler.getFunction; mxKeyHandler.prototype.getFunction = function(evt) diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js index a66ae41381..9825791160 100644 --- a/src/main/webapp/js/grapheditor/Graph.js +++ b/src/main/webapp/js/grapheditor/Graph.js @@ -2524,7 +2524,7 @@ Graph.prototype.init = function(container) return result; }; - + /** * Returns the first parent that is not a part. */ @@ -2534,6 +2534,38 @@ Graph.prototype.init = function(container) this.isTableCell(cell) || this.isTableRow(cell); }; + /** + * Returns the first parent that is not a part. + */ + Graph.prototype.getCompositeParents = function(cells) + { + var lookup = new mxDictionary(); + var newCells = []; + + for (var i = 0; i < cells.length; i++) + { + var cell = this.getCompositeParent(cells[i]); + + if (this.isTableCell(cell)) + { + cell = this.graph.model.getParent(cell); + } + + if (this.isTableRow(cell)) + { + cell = this.graph.model.getParent(cell); + } + + if (cell != null && !lookup.get(cell)) + { + lookup.put(cell, true); + newCells.push(cell); + } + } + + return newCells; + }; + /** * Returns the first parent that is not a part. */ diff --git a/src/main/webapp/js/grapheditor/Menus.js b/src/main/webapp/js/grapheditor/Menus.js index 6677d53fca..f9c0c49b74 100644 --- a/src/main/webapp/js/grapheditor/Menus.js +++ b/src/main/webapp/js/grapheditor/Menus.js @@ -1726,7 +1726,7 @@ Menubar.prototype.addMenuHandler = function(elt, funct) var clickHandler = mxUtils.bind(this, function(evt) { - if (show && elt.enabled == null || elt.enabled) + if (show && (elt.enabled == null || elt.enabled)) { this.editorUi.editor.graph.popupMenuHandler.hideMenu(); var menu = new mxPopupMenu(funct); @@ -1765,7 +1765,7 @@ Menubar.prototype.addMenuHandler = function(elt, funct) mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', mxUtils.bind(this, function(evt) { - show = this.currentElt != elt; + show = this.editorUi.currentMenu == null; evt.preventDefault(); })); diff --git a/src/main/webapp/js/grapheditor/Toolbar.js b/src/main/webapp/js/grapheditor/Toolbar.js index dd2278fc1a..6ad8678b53 100644 --- a/src/main/webapp/js/grapheditor/Toolbar.js +++ b/src/main/webapp/js/grapheditor/Toolbar.js @@ -1036,11 +1036,7 @@ Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll) menu.showDisabled = showAll; menu.labels = showLabels; menu.autoExpand = true; - - var offset = mxUtils.getOffset(elt); - menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt); - this.editorUi.setCurrentMenu(menu, elt); - + // Workaround for scrollbar hiding menu items if (!showLabels && menu.div.scrollHeight > menu.div.clientHeight) { @@ -1053,12 +1049,10 @@ Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll) this.editorUi.resetCurrentMenu(); menu.destroy(); }); - - // Extends destroy to reset global state - menu.addListener(mxEvent.EVENT_HIDE, mxUtils.bind(this, function() - { - this.currentElt = null; - })); + + var offset = mxUtils.getOffset(elt); + menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt); + this.editorUi.setCurrentMenu(menu, elt); } show = true; @@ -1069,7 +1063,8 @@ Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll) mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown', mxUtils.bind(this, function(evt) { - show = this.currentElt != elt; + show = menu == null || menu.div == null || + menu.div.parentNode == null; evt.preventDefault(); })); } diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js index 53d620a21d..c8694cf940 100644 --- a/src/main/webapp/js/integrate.min.js +++ b/src/main/webapp/js/integrate.min.js @@ -468,7 +468,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0"; "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; -window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -2343,62 +2343,62 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a}; Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var c=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0y.clientHeight-r&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage), -e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=x+14+"px",e.style.left=w+d+38-n+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){F=!0}),null,mxUtils.bind(this,function(b){F&&(a.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g(); -null!=e&&(p=d=e.w,q=c=e.h)}e=mxUtils.getDocumentSize();t=e.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");w=Math.max(1,Math.round((e.width-d-r)/2));x=Math.max(1,Math.round((t-c-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-r):p;c=Math.min(q,t-r);e=this.getPosition(w,x,d,c);w=e.x;x=e.y;y.style.left=w+"px";y.style.top=x+"px";y.style.width=d+"px";y.style.height=c+"px";!k&& +x+=a.embedViewport.y,w+=a.embedViewport.x);f&&document.body.appendChild(this.bg);var y=a.createDiv(h?"geTransDialog":"geDialog");f=this.getPosition(w,x,d,c);w=f.x;x=f.y;y.style.width=d+"px";y.style.height=c+"px";y.style.left=w+"px";y.style.top=x+"px";y.style.zIndex=this.zIndex;y.appendChild(b);document.body.appendChild(y);!g&&b.clientHeight>y.clientHeight-r&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage), +e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=x+14+"px",e.style.left=w+d+38-n+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!m)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){F=!0}),null,mxUtils.bind(this,function(b){F&&(a.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var e=k(); +null!=e&&(p=d=e.w,q=c=e.h)}e=mxUtils.getDocumentSize();t=e.height;this.bg.style.height=t+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");w=Math.max(1,Math.round((e.width-d-r)/2));x=Math.max(1,Math.round((t-c-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-r):p;c=Math.min(q,t-r);e=this.getPosition(w,x,d,c);w=e.x;x=e.y;y.style.left=w+"px";y.style.top=x+"px";y.style.width=d+"px";y.style.height=c+"px";!g&& b.clientHeight>y.clientHeight-r&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=x+14+"px",this.dialogImg.style.left=w+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=l;this.container=y;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,d,c,f,e,l,k,h,g,m){h=null!=h?h:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,b);p.setAttribute("title",b);n.appendChild(p)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",d.appendChild(g));var q=mxUtils.button(c,function(){h&&a.hideDialog();null!=f&&f()}); -q.className="geBtn";d.appendChild(q);null!=l&&(c=mxUtils.button(l,function(){h&&a.hideDialog();null!=k&&k()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var b=k.checked||g.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var l=k.checked?1:parseInt(m.value);isNaN(l)||(f=mxUtils.getScaleForPageCount(l,d,e))}d.getGraphBounds();var h=l=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),l-=c.x*e.width,h-=c.y*e.height): -b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,l,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,c,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var l=document.createElement("tbody");c=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(k);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage")); -f.appendChild(h);mxEvent.addListener(h,"click",function(a){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(a)});mxEvent.addListener(k,"change",function(){g.checked=!k.checked});c.appendChild(f);l.appendChild(c);c=c.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(g);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");f.appendChild(h);mxEvent.addListener(h, -"click",function(a){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");c.appendChild(f);l.appendChild(c);mxEvent.addListener(g,"change", -function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");k.checked=!g.checked});c=c.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");c.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);c.appendChild(f);l.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.colSpan=2; +var ErrorDialog=function(a,b,d,c,f,e,l,g,h,k,m){h=null!=h?h:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,b);p.setAttribute("title",b);n.appendChild(p)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=m&&m()}),k.className="geBtn",d.appendChild(k));var q=mxUtils.button(c,function(){h&&a.hideDialog();null!=f&&f()}); +q.className="geBtn";d.appendChild(q);null!=l&&(c=mxUtils.button(l,function(){h&&a.hideDialog();null!=g&&g()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,b){this.create(a,b)}; +PrintDialog.prototype.create=function(a){function b(a){var b=g.checked||k.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var l=g.checked?1:parseInt(m.value);isNaN(l)||(f=mxUtils.getScaleForPageCount(l,d,e))}d.getGraphBounds();var h=l=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),l-=c.x*e.width,h-=c.y*e.height): +b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,l,h,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,c,f,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var l=document.createElement("tbody");c=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");f=document.createElement("td");f.setAttribute("colspan","2");f.style.fontSize="10pt";f.appendChild(g);var h=document.createElement("span");mxUtils.write(h," "+mxResources.get("fitPage")); +f.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(a)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});c.appendChild(f);l.appendChild(c);c=c.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(k);h=document.createElement("span");mxUtils.write(h," "+mxResources.get("posterPrint")+":");f.appendChild(h);mxEvent.addListener(h, +"click",function(a){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(a)});c.appendChild(f);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";f=document.createElement("td");f.style.fontSize="10pt";f.appendChild(m);mxUtils.write(f," "+mxResources.get("pages")+" (max)");c.appendChild(f);l.appendChild(c);mxEvent.addListener(k,"change", +function(){k.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");g.checked=!k.checked});c=c.cloneNode(!1);f=document.createElement("td");mxUtils.write(f,mxResources.get("pageScale")+":");c.appendChild(f);f=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";f.appendChild(n);c.appendChild(f);l.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.colSpan=2; f.style.paddingTop="20px";f.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&f.appendChild(h);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";f.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";f.appendChild(p);a.editor.cancelFirst|| f.appendChild(h);c.appendChild(f);l.appendChild(c);e.appendChild(l);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}}; -PrintDialog.createPrintPreview=function(a,b,d,c,f,e,l){b=new mxPrintPreview(a,b,d,c,f,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=l;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var k=b.writeHead;b.writeHead=function(a){k.apply(this,arguments);a.writeln('")};return b}; +PrintDialog.createPrintPreview=function(a,b,d,c,f,e,l){b=new mxPrintPreview(a,b,d,c,f,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=l;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var g=b.writeHead;b.writeHead=function(a){g.apply(this,arguments);a.writeln('")};return b}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function d(){var b=r;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var c=a.editor.graph,f,e,l=document.createElement("table");l.style.width= -"100%";l.style.height="100%";var k=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",c.pageFormat);f.appendChild(e);k.appendChild(f);f=document.createElement("tr");e=document.createElement("td"); -mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=c.background;b();mxEvent.addListener(g, -"click",function(c){a.pickColor(m||"none",function(a){m=a;b()});mxEvent.consume(c)});e.appendChild(g);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=c.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?c.getGridSize():a)});f.appendChild(e);k.appendChild(f);f=document.createElement("tr"); +var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(k.style.backgroundColor="",k.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(k.style.backgroundColor=m,k.style.backgroundImage="")}function d(){var b=r;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var c=a.editor.graph,f,e,l=document.createElement("table");l.style.width= +"100%";l.style.height="100%";var g=document.createElement("tbody");f=document.createElement("tr");e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");f.appendChild(e);e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var h=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",c.pageFormat);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td"); +mxUtils.write(e,mxResources.get("background")+":");f.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var k=document.createElement("button");k.style.width="22px";k.style.height="22px";k.style.cursor="pointer";k.style.marginRight="20px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(k.style.position="relative",k.style.top="-6px");var m=c.background;b();mxEvent.addListener(k, +"click",function(c){a.pickColor(m||"none",function(a){m=a;b()});mxEvent.consume(c)});e.appendChild(k);mxUtils.write(e,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=c.getGridSize();e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?c.getGridSize():a)});f.appendChild(e);g.appendChild(f);f=document.createElement("tr"); e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+":");f.appendChild(e);e=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var q=document.createElement("img");q.setAttribute("valign","middle");q.style.verticalAlign="middle";q.style.border="1px solid lightGray";q.style.borderRadius="4px";q.style.marginRight="14px";q.style.maxWidth="100px";q.style.cursor="pointer";q.style.height= -"60px";q.style.padding="4px";var r=c.backgroundImage,u=function(b){a.showBackgroundImageDialog(function(a,b){b||(r=a,d())},r);mxEvent.consume(b)};mxEvent.addListener(p,"click",u);mxEvent.addListener(q,"click",u);d();e.appendChild(q);e.appendChild(p);f.appendChild(e);k.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn"; +"60px";q.style.padding="4px";var r=c.backgroundImage,u=function(b){a.showBackgroundImageDialog(function(a,b){b||(r=a,d())},r);mxEvent.consume(b)};mxEvent.addListener(p,"click",u);mxEvent.addListener(q,"click",u);d();e.appendChild(q);e.appendChild(p);f.appendChild(e);g.appendChild(f);f=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn"; a.editor.cancelFirst&&e.appendChild(p);u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||c.gridSize===b||c.setGridSize(b);b=new ChangePageSetup(a,m,r,h.get());b.ignoreColor=c.background==m;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=r?r.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||c.model.execute(b)});u.className="geBtn gePrimaryBtn"; -e.appendChild(u);a.editor.cancelFirst||e.appendChild(p);f.appendChild(e);k.appendChild(f);l.appendChild(k);this.container=l}; -PageSetupDialog.addPageFormatPanel=function(a,b,d,c){function f(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)), -Math.floor(100*parseFloat(p.value)));"custom"!=k.value&&l.checked&&(e=new mxRectangle(0,0,e.height,e.width));b&&x||e.width==y.width&&e.height==y.height||(y=e,null!=c&&c(y))};mxEvent.addListener(b,"click",function(a){e.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",F);mxEvent.addListener(n,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(e, -"change",F);mxEvent.addListener(k,"change",function(a){x="custom"==k.value;F(a,!0)});F();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}}; +t.key);mxUtils.write(w,t.title);g.appendChild(w)}var x=!1;f();a.appendChild(g);mxUtils.br(a);a.appendChild(h);a.appendChild(m);var y=d,F=function(a,b){var e=q[g.value];null!=e.format?(n.value=e.format.width/100,p.value=e.format.height/100,m.style.display="none",h.style.display=""):(h.style.display="none",m.style.display="");e=parseFloat(n.value);if(isNaN(e)||0>=e)n.value=d.width/100;e=parseFloat(p.value);if(isNaN(e)||0>=e)p.value=d.height/100;e=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)), +Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&l.checked&&(e=new mxRectangle(0,0,e.height,e.width));b&&x||e.width==y.width&&e.height==y.height||(y=e,null!=c&&c(y))};mxEvent.addListener(b,"click",function(a){e.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(k,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",F);mxEvent.addListener(n,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(e, +"change",F);mxEvent.addListener(g,"change",function(a){x="custom"==g.value;F(a,!0)});F();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:n,heightInput:p}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(a,b,d,c,f,e,l,k,h,g,m,n){h=null!=h?h:!0;var p,q,r=document.createElement("table"),u=document.createElement("tbody");r.style.position="absolute";r.style.top="30px";r.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var t=document.createElement("input"); +var FilenameDialog=function(a,b,d,c,f,e,l,g,h,k,m,n){h=null!=h?h:!0;var p,q,r=document.createElement("table"),u=document.createElement("tbody");r.style.position="absolute";r.style.top="30px";r.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var t=document.createElement("input"); t.setAttribute("value",b||"");t.style.marginLeft="4px";t.style.width=null!=n?n+"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(t.value))h&&a.hideDialog(),c(t.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==l)if(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=r.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor= "",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments); if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.view.scale,d=this.view.translate,f=this.pageFormat,l=e*this.pageScale,h=this.view.getBackgroundPageBounds(); -b=h.width;c=h.height;var k=new mxRectangle(e*d.x,e*d.y,f.width*l,f.height*l),u=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,t=a?Math.ceil(b/k.width)-1:0,w=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(c/g.height)-1:0,t=a?Math.ceil(b/g.width)-1:0,w=h.x+b,x=h.y+c;null==this.horizontalPageBreaks&&0mxUtils.indexOf(e,h[b])&&e.push(h[b]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"], -["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(e,l[b])&&e.push(l[b]);var n=function(a,b,d,f,l,h,g){f=null!=f?f:c.currentVertexStyle;l=null!=l?l:c.currentEdgeStyle;h=null!=h?h:!0;d=null!=d?d:c.getModel();if(g){g=[];for(var n=0;nmxUtils.indexOf(k,M))&& +g="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(a){try{var b=c.getCellStyle(a,!1),e=[],d=[],f;for(f in b)e.push(b[f]),d.push(f);c.getModel().isEdge(a)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",[a]))}catch(N){this.handleError(N)}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle); +c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var h=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;bmxUtils.indexOf(e,h[b])&&e.push(h[b]);var k="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"], +["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;bmxUtils.indexOf(e,l[b])&&e.push(l[b]);var n=function(a,b,d,f,l,h,k){f=null!=f?f:c.currentVertexStyle;l=null!=l?l:c.currentEdgeStyle;h=null!=h?h:!0;d=null!=d?d:c.getModel();if(k){k=[];for(var n=0;nmxUtils.indexOf(g,M))&& (x=mxUtils.setStyle(x,M,Y))}Editor.simpleLabels&&(x=mxUtils.setStyle(mxUtils.setStyle(x,"html",null),"whiteSpace",null));d.setStyle(p,x)}}finally{d.endUpdate()}return a};c.addListener("cellsInserted",function(a,b){n(b.getProperty("cells"),null,null,null,null,!0,!0)});c.addListener("textInserted",function(a,b){n(b.getProperty("cells"),!0)});this.insertHandler=n;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(a){null==a&&(a=window.event);return c.isEditing()||null!= a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown= p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return p(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer); @@ -2433,8 +2433,8 @@ y!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild, c.cellEditor.startEditing=function(){G.apply(this,arguments);E();if(c.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){var b=c.getSelectedEditingElement();null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=z.toolbar&&(z.toolbar.setFontName(Graph.stripQuotes(b.fontFamily)),z.toolbar.setFontSize(parseInt(b.fontSize))));a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",b);mxEvent.addListener(c.cellEditor.textarea,"touchend",b);mxEvent.addListener(c.cellEditor.textarea, "mouseup",b);mxEvent.addListener(c.cellEditor.textarea,"keyup",b);b()}};var J=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,b){try{J.apply(this,arguments),E()}catch(P){z.handleError(P)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(M){}var L=c.fireMouseEvent;c.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();L.apply(this,arguments)};c.popupMenuHandler.autoExpand= !0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};c.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var e=[b.getProperty("cell")];b.getProperty("terminalInserted")&&(e.push(b.getProperty("terminal")),window.setTimeout(function(){null!= -z.hoverIcons&&z.hoverIcons.update(c.view.getState(e[e.length-1]))},0));n(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("cells"),f=!1,k=!1;if(0l.length?35*l.length:140;h.className="geToolbarContainer geSidebarContainer";h.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ -mxPopupMenu.prototype.zIndex+1+";";k||mxUtils.setPrefixedStyle(h.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(h.style.backgroundColor=m.background);m.container.appendChild(h);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";h.appendChild(f);null!=n&&"1"!=urlParams.sketch? -this.sidebar.graph.pasteStyle(n,[d]):g.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var f=m.cloneCell(d);if(null!=c)c(f);else{f.geometry.x=m.snap(Math.round(a/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(b/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f); -m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(f))}null!=e&&e()})});for(f=0;f<(k?Math.min(l.length,4):l.length);f++)d(l[f]);l=h.offsetTop+h.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0l.length?35*l.length:140;h.className="geToolbarContainer geSidebarContainer";h.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ +mxPopupMenu.prototype.zIndex+1+";";g||mxUtils.setPrefixedStyle(h.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(h.style.backgroundColor=m.background);m.container.appendChild(h);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";h.appendChild(f);null!=n&&"1"!=urlParams.sketch? +this.sidebar.graph.pasteStyle(n,[d]):k.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var f=m.cloneCell(d);if(null!=c)c(f);else{f.geometry.x=m.snap(Math.round(a/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(b/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f); +m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(f))}null!=e&&e()})});for(f=0;f<(g?Math.min(l.length,4):l.length);f++)d(l[f]);l=h.offsetTop+h.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0d&&(b=a.substring(d,c+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(f){}return b}; EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){if(null!=b){var c=decodeURIComponent(b);this.isCompatibleString(c)&&(b=c)}a(b)}),"text")}),"html")}; EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(d){if(null!=d&&0':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0this.maxTooltipWidth||c>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/c))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject; -b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,m?null:this.editorUi.editor.graph.defaultVertexStyle,m?null:this.editorUi.editor.graph.defaultEdgeStyle,m,!0);this.graph2.addCells(b);mxClient.NO_FO=e;m=this.graph2.getGraphBounds();k&&0d||m.height>c)?(d=Math.round(100*Math.min(d/m.width,c/m.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/m.width,this.maxTooltipHeight/m.height))/100),m=this.graph2.getGraphBounds()): -(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+d+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",m.width*=d,m.height*=d)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");d=m.width+2*this.tooltipBorder+4;c=m.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=d+"px";k=d;this.tooltipTitles&&null!=f&&0d&&(this.tooltip.style.width=k+"px");this.tooltip.style.height=c+"px";f=-Math.round(m.x-this.tooltipBorder)+(k>d?(k-d)/2:0);d=-Math.round(m.y-this.tooltipBorder);l=null!=l?l:this.getTooltipOffset(a,m);a=l.x;l=l.y;mxClient.IS_SVG?0!=f||0!=d?this.graph2.view.canvas.setAttribute("transform", +"click",mxUtils.bind(this,function(a){this.hideTooltip();mxEvent.consume(a)})));this.tooltipCloseImage.style.display=k?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!g&&(d>this.maxTooltipWidth||c>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/c))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject; +b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,m?null:this.editorUi.editor.graph.defaultVertexStyle,m?null:this.editorUi.editor.graph.defaultEdgeStyle,m,!0);this.graph2.addCells(b);mxClient.NO_FO=e;m=this.graph2.getGraphBounds();g&&0d||m.height>c)?(d=Math.round(100*Math.min(d/m.width,c/m.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/m.width,this.maxTooltipHeight/m.height))/100),m=this.graph2.getGraphBounds()): +(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+d+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",m.width*=d,m.height*=d)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");d=m.width+2*this.tooltipBorder+4;c=m.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=d+"px";g=d;this.tooltipTitles&&null!=f&&0d&&(this.tooltip.style.width=g+"px");this.tooltip.style.height=c+"px";f=-Math.round(m.x-this.tooltipBorder)+(g>d?(g-d)/2:0);d=-Math.round(m.y-this.tooltipBorder);l=null!=l?l:this.getTooltipOffset(a,m);a=l.x;l=l.y;mxClient.IS_SVG?0!=f||0!=d?this.graph2.view.canvas.setAttribute("transform", "translate("+f+","+d+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=f+"px",this.graph2.view.drawPane.style.top=d+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=l+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()}; Sidebar.prototype.showTooltip=function(a,b,d,c,f,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var l=mxUtils.bind(this,function(){this.createTooltip(a,b,d,c,f,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?l():this.thread=window.setTimeout(l,this.tooltipDelay);this.currentElt=a}}; Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,d,c,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,b,d,c)}))}; @@ -2633,18 +2633,18 @@ Sidebar.prototype.addEntries=function(a){for(var b=0;bHeading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;", @@ -2753,37 +2753,37 @@ a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new 0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;", 160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;", 160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,f);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b}; -Sidebar.prototype.createThumb=function(a,b,d,c,f,e,l){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var k=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(k,Math.floor((b-a.width*k)/2/k-a.x),Math.floor((d-a.height*k)/2/k-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG|| -mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(k=this.graph.container.cloneNode(!1),k.innerHTML=this.graph.container.innerHTML):k=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;k.style.position="relative";k.style.overflow="hidden";k.style.left=this.thumbBorder+"px";k.style.top=this.thumbBorder+"px";k.style.width=b+"px";k.style.height=d+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";c.appendChild(k); +Sidebar.prototype.createThumb=function(a,b,d,c,f,e,l){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var g=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(g,Math.floor((b-a.width*g)/2/g-a.x),Math.floor((d-a.height*g)/2/g-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG|| +mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(g=this.graph.container.cloneNode(!1),g.innerHTML=this.graph.container.innerHTML):g=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;g.style.position="relative";g.style.overflow="hidden";g.style.left=this.thumbBorder+"px";g.style.top=this.thumbBorder+"px";g.style.width=b+"px";g.style.height=d+"px";g.style.visibility="";g.style.minWidth="";g.style.minHeight="";c.appendChild(g); this.sidebarTitles&&null!=f&&0!=l&&(c.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,f),c.appendChild(b));return a}; Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})}; -Sidebar.prototype.createItem=function(a,b,d,c,f,e,l,k){k=null!=k?k:!0;var h=document.createElement("a");h.className="geItem";h.style.overflow="hidden";var g=2*this.thumbBorder;h.style.width=this.thumbWidth+g+"px";h.style.height=this.thumbHeight+g+"px";h.style.padding=this.thumbPadding+"px";mxEvent.addListener(h,"click",function(a){mxEvent.consume(a)});g=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(g,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle, -!0,!0);this.createThumb(g,this.thumbWidth,this.thumbHeight,h,b,d,c,f,e);var m=new mxRectangle(0,0,f,e);1R&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(Z,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style, @@ -2801,44 +2801,44 @@ f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=x&&K==z?null:mxDragSource arguments);for(var a=[J,L,z,F,H,C,E],b=0;bl||Math.abs(k.y-mxEvent.getClientY(b))> -l)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));f.apply(this,arguments)};b.mouseUp=function(c){try{mxEvent.isPopupTrigger(c)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||h.itemClicked(d,b,c,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),k=null,h.currentElt=a}catch(m){b.reset(),h.editorUi.handleError(m)}}}; -Sidebar.prototype.createVertexTemplateEntry=function(a,b,d,c,f,e,l,k){null!=k&&null!=f&&(k+=" "+f);k=null!=k&&0l||Math.abs(g.y-mxEvent.getClientY(b))> +l)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));f.apply(this,arguments)};b.mouseUp=function(c){try{mxEvent.isPopupTrigger(c)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||h.itemClicked(d,b,c,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),g=null,h.currentElt=a}catch(m){b.reset(),h.editorUi.handleError(m)}}}; +Sidebar.prototype.createVertexTemplateEntry=function(a,b,d,c,f,e,l,g){null!=g&&null!=f&&(g+=" "+f);g=null!=g&&0mxUtils.indexOf(f,b)){d=this.getTagsForStencil(a,b);var g=null!=k?k[b]:null;null!=g&&d.push(g);m.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+c,Math.round(e*l),Math.round(h*l),"",b.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}), +Sidebar.prototype.addStencilPalette=function(a,b,d,c,f,e,l,g,h,k){l=null!=l?l:1;if(this.addStencilsToIndex){var m=[];if(null!=h)for(k=0;kmxUtils.indexOf(f,b)){d=this.getTagsForStencil(a,b);var k=null!=g?g[b]:null;null!=k&&d.push(k);m.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+c,Math.round(e*l),Math.round(h*l),"",b.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}), !0,!0);this.addPaletteFunctions(a,b,!1,m)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(a){null==c&&(c="");null!=e&&e.call(this,a);if(null!=h)for(var b=0;bmxUtils.indexOf(f,d))&&a.appendChild(this.createVertexTemplate("shape="+b+d.toLowerCase()+c,Math.round(h*l),Math.round(g*l),"",d.replace(/_/g," "),!0))}),!0)}))}; Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler), this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var c=0;ce||Math.abs(l.y- -b.getGraphY())>e){var f=this.selectionCellsHandler.getHandler(c.cell);null==f&&this.model.isEdge(c.cell)&&(f=this.createHandler(c));if(null!=f&&null!=f.bends&&0e||Math.abs(l.y- +b.getGraphY())>e){var f=this.selectionCellsHandler.getHandler(c.cell);null==f&&this.model.isEdge(c.cell)&&(f=this.createHandler(c));if(null!=f&&null!=f.bends&&0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(f)||[""]).pop().replace(e,""),o:(0f&&"%"==b.charAt(match.index-1))l=e.substring(1);else{var k=e.substring(1,e.length-1);if("id"==k)l=a.id;else if(0>k.indexOf("{"))for(var h=a;null==l&&null!=h;)null!=h.value&&"object"==typeof h.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=h.getAttribute(k+"_"+Graph.diagramLanguage)), -null==l&&(l=h.hasAttribute(k)?null!=h.getAttribute(k)?h.getAttribute(k):"":null)),h=this.model.getParent(h);null==l&&(l=this.getGlobalVariable(k));null==l&&null!=d&&(l=d[k])}c.push(b.substring(f,match.index)+(null!=l?l:e));f=match.index+e.length}}c.push(b.substring(f))}return c.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0f&&"%"==b.charAt(match.index-1))l=e.substring(1);else{var g=e.substring(1,e.length-1);if("id"==g)l=a.id;else if(0>g.indexOf("{"))for(var h=a;null==l&&null!=h;)null!=h.value&&"object"==typeof h.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(l=h.getAttribute(g+"_"+Graph.diagramLanguage)), +null==l&&(l=h.hasAttribute(g)?null!=h.getAttribute(g)?h.getAttribute(g):"":null)),h=this.model.getParent(h);null==l&&(l=this.getGlobalVariable(g));null==l&&null!=d&&(l=d[g])}c.push(b.substring(f,match.index)+(null!=l?l:e));f=match.index+e.length}}c.push(b.substring(f))}return c.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox, b,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,c,f){a=this.cloneCell(a);for(var e=0;ef||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-h.x)>f||Math.abs(m.y-h.y)>f)&&(Math.abs(m.x-G.x)>f||Math.abs(m.y-G.y)>f)&&(Math.abs(m.x-z.x)>f||Math.abs(m.y-z.y)>f)){z=m.x-k.x;G=m.y-k.y;m={distSq:z*z+G*G,x:m.x,y:m.y};for(z=0;zm.distSq){l.splice(z,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(C=0;Cf||Math.abs(m.y-g.y)>f)&&(Math.abs(m.x-k.x)>f||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-G.x)>f||Math.abs(m.y-G.y)>f)&&(Math.abs(m.x-z.x)>f||Math.abs(m.y-z.y)>f)){z=m.x-g.x;G=m.y-g.y;m={distSq:z*z+G*G,x:m.x,y:m.y};for(z=0;zm.distSq){l.splice(z,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(C=0;Cf*f&&0f*f&&(z=new mxPoint(E.x-n.x,E.y-n.y),C=new mxPoint(E.x+n.x,E.y+n.y),m.push(z),this.addPoints(a,m,c,d,!1,null,h),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,h=!1,"sharp"==g?(a.lineTo(z.x-n.y*m,z.y+n.x*m),a.lineTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x,C.y)):"line"==g?(a.moveTo(z.x+n.y*m,z.y-n.x*m),a.lineTo(z.x-n.y*m,z.y+n.x*m),a.moveTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x+n.y* -m,C.y-n.x*m),a.moveTo(C.x,C.y)):"arc"==g?(m*=1.3,a.curveTo(z.x-n.y*m,z.y+n.x*m,C.x-n.y*m,C.y+n.x*m,C.x,C.y)):(a.moveTo(C.x,C.y),h=!0),m=[C],z=!0))}else n=null;z||(m.push(E),k=E)}this.addPoints(a,m,c,d,!1,null,h);a.stroke()}};var l=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):l.apply(this,arguments)};var k=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)k.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),h=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var m=Math.cos(-g),l=Math.sin(-g),e=mxUtils.getRotatedPoint(e,m,l,h);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);m+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,m);0!=g&&(m=Math.cos(g),l=Math.sin(g),e=mxUtils.getRotatedPoint(e,m,l,h));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;ff*f&&0f*f&&(z=new mxPoint(E.x-n.x,E.y-n.y),C=new mxPoint(E.x+n.x,E.y+n.y),m.push(z),this.addPoints(a,m,c,d,!1,null,k),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,k=!1,"sharp"==h?(a.lineTo(z.x-n.y*m,z.y+n.x*m),a.lineTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x,C.y)):"line"==h?(a.moveTo(z.x+n.y*m,z.y-n.x*m),a.lineTo(z.x-n.y*m,z.y+n.x*m),a.moveTo(C.x-n.y*m,C.y+n.x*m),a.lineTo(C.x+n.y* +m,C.y-n.x*m),a.moveTo(C.x,C.y)):"arc"==h?(m*=1.3,a.curveTo(z.x-n.y*m,z.y+n.x*m,C.x-n.y*m,C.y+n.x*m,C.x,C.y)):(a.moveTo(C.x,C.y),k=!0),m=[C],z=!0))}else n=null;z||(m.push(E),g=E)}this.addPoints(a,m,c,d,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):l.apply(this,arguments)};var g=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)g.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var m=Math.cos(-h),l=Math.sin(-h),e=mxUtils.getRotatedPoint(e,m,l,k);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);m+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==h&&f,m);0!=h&&(m=Math.cos(h),l=Math.sin(h),e=mxUtils.getRotatedPoint(e,m,l,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f=e.getStatus()&&eval.call(window,e.getText())}}catch(l){null!=window.console&&console.log("error in getStencil:",a,d,b,f,l)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; @@ -3040,7 +3041,7 @@ mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"stri mxStencilRegistry.loadStencilSet=function(a,b,d,c){var f=mxStencilRegistry.packages[a];if(null!=d&&d||null==f){var e=!1;if(null==f)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,e=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,e))}));return}f=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=f;e=!0}catch(l){null!=window.console&&console.log("error in loadStencilSet:",a,l)}null!=f&&null!= f.documentElement&&mxStencilRegistry.parseStencilSet(f.documentElement,b,e)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b=l.x&&this.model.remove(Q[b]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW, -mxConstants.NONE,[a]);var n=this.model.getTerminal(c,!1);if(null!=n){var T=this.getCurrentCellStyle(n);null!=T&&"1"==T.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)g.apply(this,arguments); -else{var d=this.getSelectionCell(),e=null,f=[],h=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(f.push(b),b==d)e=f.length-1;else if(a&&null==d&&0e||!a&&0e||!a&&0q)for(X=0;X>q;X--)this.model.remove(p[p.length+ -X-1]);p=this.model.getChildCells(a[k],!0);for(X=0;XmxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var g=this.model.getChildCells(f,!0),h=0,k=0;k< -g.length;k++)0<=mxUtils.indexOf(a,g[k])&&h++;h==g.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b,c){c=null!=c?c:new Graph;for(var d=0;dq)for(X=0;X>q;X--)this.model.remove(p[p.length+ +X-1]);p=this.model.getChildCells(a[g],!0);for(X=0;XmxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var h=this.model.getChildCells(f,!0),k=0,g=0;g< +h.length;g++)0<=mxUtils.indexOf(a,h[g])&&k++;k==h.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b,c){c=null!=c?c:new Graph;for(var d=0;dg||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()|| (this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& @@ -3244,41 +3245,41 @@ Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.c Format.prototype.init=function(){var a=this.editorUi,b=a.editor,d=b.graph;this.update=mxUtils.bind(this,function(a,b){this.refresh()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.update);d.getModel().addListener(mxEvent.CHANGE,this.update);d.addListener(mxEvent.EDITING_STARTED,this.update);d.addListener(mxEvent.EDITING_STOPPED,this.update);d.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);d.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged", this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a=e.length||a[g]!=e[g].node||a[g]==e[g].node&&a[g].getAttribute("color")!=e[g].color){e=a[g].firstChild;if(null!=e&&"A"==e.nodeName&&null==e.nextSibling&&null!= -e.firstChild){a[g].parentNode.insertBefore(e,a[g]);for(b=e.firstChild;null!=b;){var k=b.nextSibling;a[g].appendChild(b);b=k}e.appendChild(a[g])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[a],"cells",f.cells))},null!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:c.shapeForegroundColor,{install:function(a){aa=a},destroy:function(){aa=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"), -mxConstants.STYLE_FONTCOLOR,"default",function(a){ma.style.display=a==mxConstants.NONE?"none":"";oa.style.display=ma.style.display},function(a){a==mxConstants.NONE?c.setCellStyles(mxConstants.STYLE_NOLABEL,"1",f.cells):c.setCellStyles(mxConstants.STYLE_NOLABEL,null,f.cells);c.setCellStyles(mxConstants.STYLE_FONTCOLOR,a,f.cells);c.updateLabelElements(f.cells,function(a){a.removeAttribute("color");a.style.color=null})},c.shapeForegroundColor);k.style.fontWeight="bold";l.appendChild(k);l.appendChild(ma); -c.cellEditor.isContentEditing()||l.appendChild(oa);a.appendChild(l);l=this.createPanel();l.style.paddingTop="2px";l.style.paddingBottom="4px";k=c.filterSelectionCells(mxUtils.bind(this,function(a){var b=c.view.getState(a);return null==b||c.isAutoSizeState(b)||c.getModel().isEdge(a)||!c.isTableRow(a)&&!c.isTableCell(a)&&!c.isCellResizable(a)}));n=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);n.style.fontWeight="bold";0"+c.cellEditor.textarea.innerHTML+"

"),d=c.cellEditor.textarea.firstChild);null!=d&&null!=c.cellEditor.textarea&&d!=c.cellEditor.textarea&&c.cellEditor.textarea.contains(d)&&(d.style.lineHeight=b/100);a.value=b+" %"},function(a){ja=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==c.cellEditor.textarea&&(da=c.cellEditor.saveSelection())}); -mxEvent.addListener(a,"touchstart",function(){document.activeElement==c.cellEditor.textarea&&(da=c.cellEditor.saveSelection())});a.value="120 %"}));l=e.cloneNode(!1);l.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],l,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},l),this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-table",mxResources.get("table"), -!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(k);this.styleButtons(n);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(l);a.appendChild(k);k=e.cloneNode(!1);k.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z, -null!=G?G.cellIndex:0)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z,null!=G?G.cellIndex+1:-1)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=G&&c.deleteColumn(z,G.cellIndex)}catch(U){this.editorUi.handleError(U)}}), -k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex+1)}catch(U){this.editorUi.handleError(U)}}),k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), -mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.deleteRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),k)];this.styleButtons(n);n[2].style.marginRight="10px";l=this.createPanel();l.style.paddingTop="10px";l.style.paddingBottom="10px";l.appendChild(this.createTitle(mxResources.get("table")));l.appendChild(k);e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!= +mxEvent.addListener(a,"touchstart",function(){document.activeElement==c.cellEditor.textarea&&(da=c.cellEditor.saveSelection())});a.value="120 %"}));l=e.cloneNode(!1);l.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],l,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},l),this.editorUi.toolbar.addMenuFunctionInContainer(l,"geSprite-table",mxResources.get("table"), +!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(l);a.appendChild(g);g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z, +null!=G?G.cellIndex:0)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&c.insertColumn(z,null!=G?G.cellIndex+1:-1)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=G&&c.deleteColumn(z,G.cellIndex)}catch(U){this.editorUi.handleError(U)}}), +g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.insertRow(z,J.sectionRowIndex+1)}catch(U){this.editorUi.handleError(U)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), +mxUtils.bind(this,function(){try{null!=z&&null!=J&&c.deleteRow(z,J.sectionRowIndex)}catch(U){this.editorUi.handleError(U)}}),g)];this.styleButtons(n);n[2].style.marginRight="10px";l=this.createPanel();l.style.paddingTop="10px";l.style.paddingBottom="10px";l.appendChild(this.createTitle(mxResources.get("table")));l.appendChild(g);e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!= z){var b=z.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var d=null==G||null!=a&&mxEvent.isShiftDown(a)?z:G;c.processElements(d,function(a){a.style.border=null});null==b||b==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=""):(d.setAttribute("border", "1"),d.style.border="1px solid "+b,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=z){var b=z.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var d=null==G||null!= a&&mxEvent.isShiftDown(a)?z:G;c.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=z){var a=z.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(b){if(null!=c.getParentByName(a,b,c.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==b)return!0;return!1},k=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},m=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&& -"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},l=mxUtils.getCurrentStyle(a),n=k(l),p=m(n,l,a),t=a.getElementsByTagName("*");if(0b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(b){if(null!=c.getParentByName(a,b,c.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==b)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},m=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&& +"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},l=mxUtils.getCurrentStyle(a),n=g(l),p=m(n,l,a),t=a.getElementsByTagName("*");if(0H&&(g=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity= +0;qH&&(k=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity= "1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})},p=document.createElement("div"),p.style.position="absolute",p.style.left="0px",p.style.top="0px",p.style.bottom="0px",p.style.width="24px",p.style.height="24px",p.style.margin="0px",p.style.cursor="pointer",p.style.opacity="0.5",p.style.backgroundRepeat="no-repeat",p.style.backgroundPosition="center center",p.style.backgroundSize="24px 24px",p.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(p.style.filter= -"invert(100%)"),q=p.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",h.appendChild(p),h.appendChild(q),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage-1,H))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage+1,H))})),g(p),g(q))}else E();return a}; +"invert(100%)"),q=p.cloneNode(!1),q.style.backgroundImage="url("+Editor.nextImage+")",q.style.left="",q.style.right="2px",h.appendChild(p),h.appendChild(q),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage-1,H))})),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){z(mxUtils.mod(this.format.currentStylePage+1,H))})),k(p),k(q))}else E();return a}; DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0; DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))}; DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return d.pageVisible},function(a){b.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(d.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})); @@ -3495,19 +3496,19 @@ a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){r {install:function(a){this.listener=function(){a(d.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a}; DiagramFormatPanel.prototype.addGridOption=function(a){function b(a){var b=d.isFloatUnit()?parseFloat(e.value):parseInt(e.value),b=d.fromUnit(Math.max(d.inUnit(1),isNaN(b)?d.inUnit(10):b));b!=f.getGridSize()&&(mxGraph.prototype.gridSize=b,f.setGridSize(b));e.value=d.inUnit(b)+" "+d.getUnit();mxEvent.consume(a)}var d=this,c=this.editorUi,f=c.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="48px";e.style.marginTop="-2px";e.style.height= "21px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";e.style.boxSizing="border-box";e.value=this.inUnit(f.getGridSize())+" "+this.getUnit();var l=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=f.isGridEnabled()?"":"none";l.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(a){13==a.keyCode?(f.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(e.value=f.getGridSize(),f.container.focus(),mxEvent.consume(a))}); -mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";l.style.marginTop="-17px";l.style.right="66px";var k=this.createColorOption(mxResources.get("grid"),function(){var a=f.view.gridColor;return f.isGridEnabled()?a:null},function(a){var b=f.isGridEnabled();a==mxConstants.NONE?f.setGridEnabled(!1):(f.setGridEnabled(!0),c.setGridColor(a));e.style.display=f.isGridEnabled()?"":"none";l.style.display=e.style.display;b!=f.isGridEnabled()&&(f.defaultGridEnabled=f.isGridEnabled(), -c.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?f.view.defaultDarkGridColor:f.view.defaultGridColor,{install:function(a){this.listener=function(){a(f.isGridEnabled()?f.view.gridColor:null)};c.addListener("gridColorChanged",this.listener);c.addListener("gridEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});k.appendChild(e);k.appendChild(l);a.appendChild(k)}; +mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";l.style.marginTop="-17px";l.style.right="66px";var g=this.createColorOption(mxResources.get("grid"),function(){var a=f.view.gridColor;return f.isGridEnabled()?a:null},function(a){var b=f.isGridEnabled();a==mxConstants.NONE?f.setGridEnabled(!1):(f.setGridEnabled(!0),c.setGridColor(a));e.style.display=f.isGridEnabled()?"":"none";l.style.display=e.style.display;b!=f.isGridEnabled()&&(f.defaultGridEnabled=f.isGridEnabled(), +c.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?f.view.defaultDarkGridColor:f.view.defaultGridColor,{install:function(a){this.listener=function(){a(f.isGridEnabled()?f.view.gridColor:null)};c.addListener("gridColorChanged",this.listener);c.addListener("gridEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});g.appendChild(e);g.appendChild(l);a.appendChild(g)}; DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a}; DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var c=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(b,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(c.widthInput,function(){c.set(d.pageFormat)});this.addKeyHandler(c.heightInput, function(){c.set(d.pageFormat)});var f=function(){c.set(d.pageFormat)};b.addListener("pageFormatChanged",f);this.listeners.push({destroy:function(){b.removeListener(f)}});d.getModel().addListener(mxEvent.CHANGE,f);this.listeners.push({destroy:function(){d.getModel().removeListener(f)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a}; -DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(a,b,c){mxShape.call(this);this.line=a;this.stroke=b;this.strokewidth=null!=c?c:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function d(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function l(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function n(){mxShape.call(this)} +DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(a,b,c){mxShape.call(this);this.line=a;this.stroke=b;this.strokewidth=null!=c?c:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function d(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function l(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxShape.call(this)}function n(){mxShape.call(this)} function p(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}function q(){mxActor.call(this)}function r(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function t(){mxActor.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function F(){mxActor.call(this)}function H(){mxActor.call(this)}function C(){mxActor.call(this)}function E(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round"); this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,E.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,E.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,E.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,E.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,E.prototype.curveTo); this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,E.prototype.arcTo)}function z(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function J(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function K(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function ba(){mxCylinder.call(this)}function Y(){mxShape.call(this)}function N(){mxShape.call(this)}function R(){mxEllipse.call(this)}function V(){mxShape.call(this)} function Z(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function ma(){mxShape.call(this)}function oa(){mxShape.call(this)}function ta(){mxShape.call(this)}function qa(){mxShape.call(this)}function fa(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function va(){mxRectangleShape.call(this)}function na(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function la(){mxArrowConnector.call(this);this.spacing=0}function ha(){mxArrowConnector.call(this); this.spacing=0}function ia(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxActor.call(this)}function U(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function X(){mxActor.call(this)}function ga(){mxActor.call(this)}function sa(){mxActor.call(this)}function Ba(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)} function Ma(){mxRhombus.call(this)}function Na(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function Ga(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function za(){mxActor.call(this)}function Aa(){mxActor.call(this)}function O(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)} -function Ra(a,b,c,d,e,f,g,k,h,m){g+=h;var v=d.clone();d.x-=e*(2*g+h);d.y-=f*(2*g+h);e*=g+h;f*=g+h;return function(){a.ellipse(v.x-e-g,v.y-f-g,2*g,2*g);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var a=null;if(null!=this.line)for(var b=0;bv?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f), -a.end(),a.stroke())};mxCellRenderer.registerShape("note",h);mxUtils.extend(g,h);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, +a.end(),a.stroke())};mxCellRenderer.registerShape("note",h);mxUtils.extend(k,h);mxCellRenderer.registerShape("note2",k);k.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, "isoAngle",this.isoAngle))))*Math.PI/200,f=Math.min(d*Math.tan(f),.5*e);a.translate(b,c);a.begin();a.moveTo(.5*d,0);a.lineTo(d,f);a.lineTo(d,e-f);a.lineTo(.5*d,e);a.lineTo(0,e-f);a.lineTo(0,f);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,f);a.lineTo(.5*d,2*f);a.lineTo(d,f);a.moveTo(.5*d,2*f);a.lineTo(.5*d,e);a.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(n,mxShape);n.prototype.size=15;n.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(.5* e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.translate(b,c);0==f?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),a.moveTo(0,f),a.arcTo(.5*d,f,0,0,1,.5*d,0),a.arcTo(.5*d,f,0,0,1,d,f),a.lineTo(d,e-f),a.arcTo(.5*d,f,0,0,1,.5*d,e),a.arcTo(.5*d,f,0,0,1,0,e-f),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(d,f),a.arcTo(.5*d,f,0,0,1,.5*d,2*f),a.arcTo(.5*d,f,0,0,1,0,f),a.stroke())};mxCellRenderer.registerShape("cylinder2",n);mxUtils.extend(p,mxCylinder);p.prototype.size= 15;p.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),v=mxUtils.getValue(this.style,"lid",!0);a.translate(b,c);0==f?(a.rect(0,0,d,e),a.fillAndStroke()):(a.begin(),v?(a.moveTo(0,f),a.arcTo(.5*d,f,0,0,1,.5*d,0),a.arcTo(.5*d,f,0,0,1,d,f)):(a.moveTo(0,0),a.arcTo(.5*d,f,0,0,0,.5*d,f),a.arcTo(.5*d,f,0,0,0,d,0)),a.lineTo(d,e-f),a.arcTo(.5*d,f,0,0,1,.5*d,e),a.arcTo(.5*d,f,0,0,1,0,e-f),a.close(),a.fillAndStroke(),a.setShadow(!1), v&&(a.begin(),a.moveTo(d,f),a.arcTo(.5*d,f,0,0,1,.5*d,2*f),a.arcTo(.5*d,f,0,0,1,0,f),a.stroke()))};mxCellRenderer.registerShape("cylinder3",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",q);mxUtils.extend(r,mxCylinder);r.prototype.tabWidth=60;r.prototype.tabHeight=20;r.prototype.tabPosition="right";r.prototype.arcSize=.1; -r.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),v=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(d,e)); -k=Math.min(k,.5*d,.5*(e-c));b=Math.max(b,k);b=Math.min(d-k,b);v||(k=0);a.begin();"left"==f?(a.moveTo(Math.max(k,0),c),a.lineTo(Math.max(k,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(k,0),0),a.lineTo(d-Math.max(k,0),c));v?(a.moveTo(0,k+c),a.arcTo(k,k,0,0,1,k,c),a.lineTo(d-k,c),a.arcTo(k,k,0,0,1,d,k+c),a.lineTo(d,e-k),a.arcTo(k,k,0,0,1,d-k,e),a.lineTo(k,e),a.arcTo(k,k,0,0,1,0,e-k)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke(); +r.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var f=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),v=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(h*=Math.min(d,e)); +h=Math.min(h,.5*d,.5*(e-c));b=Math.max(b,h);b=Math.min(d-h,b);v||(h=0);a.begin();"left"==f?(a.moveTo(Math.max(h,0),c),a.lineTo(Math.max(h,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(h,0),0),a.lineTo(d-Math.max(h,0),c));v?(a.moveTo(0,h+c),a.arcTo(h,h,0,0,1,h,c),a.lineTo(d-h,c),a.arcTo(h,h,0,0,1,d,h+c),a.lineTo(d,e-h),a.arcTo(h,h,0,0,1,d-h,e),a.lineTo(h,e),a.arcTo(h,h,0,0,1,0,e-h)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke(); a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(a.begin(),a.moveTo(d-30,c+20),a.lineTo(d-20,c+10),a.lineTo(d-10,c+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",r);r.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style, "tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(a.width,a.height));f=Math.min(f,.5*a.width,.5*(a.height-b));d||(f=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(f,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,f,Math.min(a.height,a.height- b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);var f=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1);b=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));c=mxUtils.getValue(this.style,"umlStateConnection",null);v||(b*=Math.min(d,e));b=Math.min(b,.5*d,.5*e);f||(b=0);f=0;null!=c&&(f=10);a.begin();a.moveTo(f, @@ -3538,14 +3539,14 @@ d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b 0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",x);var Za=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Za.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style, "size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(b/=2);return new mxRectangle(0,Math.min(a.height*this.scale,2*b*this.scale),0,Math.max(0,.3*b*this.scale))}return null};r.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style, "tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(a.width,a.height));f=Math.min(f,.5*a.width,.5*(a.height-b));d||(f=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)? -new mxRectangle(f,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,f,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl", +new mxRectangle(f,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,f,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};u.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};k.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl", !1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,Math.max(0,b*this.scale))}return null};mxUtils.extend(y,mxActor);y.prototype.size=.2;y.prototype.fixedSize=20;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, "size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",y);mxUtils.extend(F,mxActor);F.prototype.size=.2;F.prototype.fixedSize=20;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5* d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",F);mxUtils.extend(H,mxActor);H.prototype.size=.5;H.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null); b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",H);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke); b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",C);E.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};E.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)}; E.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};E.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};E.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};E.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a- -this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var v=Math.round(f/10),g=this.defaultVariation;5>v&&(v=5,g/=3);for(var k=c(a-this.lastX)*d/v,c=c(b-this.lastY)*e/v,d=d/f,e=e/f,f=0;ff){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var v=Math.round(f/10),g=this.defaultVariation;5>v&&(v=5,g/=3);for(var h=c(a-this.lastX)*d/v,c=c(b-this.lastY)*e/v,d=d/f,e=e/f,f=0;fv+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style, -"fixedSize","0"),f=e?F.prototype.fixedSize:F.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+k-e,g),new mxPoint(v+k,g+h),new mxPoint(v,g+h),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_WEST? -(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+k,g),new mxPoint(v+k-e,g+h),new mxPoint(v+e,g+h),new mxPoint(v,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(v+k,g),new mxPoint(v+k,g+h),new mxPoint(v,g+h-e),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+k,g+e),new mxPoint(v+k,g+h-e),new mxPoint(v,g+h),new mxPoint(v, -g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.xv+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?L.prototype.fixedSize:L.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,k=a.width,h=a.height,m=a.getCenterX();a=a.getCenterY();b=null!= -b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+k-e,g),new mxPoint(v+k,a),new mxPoint(v+k-e,g+h),new mxPoint(v,g+h),new mxPoint(v+e,a),new mxPoint(v,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+k,g),new mxPoint(v+k-e,a),new mxPoint(v+ -k,g+h),new mxPoint(v+e,g+h),new mxPoint(v,a),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(m,g),new mxPoint(v+k,g+e),new mxPoint(v+k,g+h),new mxPoint(m,g+h-e),new mxPoint(v,g+h),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(m,g+e),new mxPoint(v+k,g),new mxPoint(v+k,g+h-e),new mxPoint(m,g+h),new mxPoint(v,g+h-e),new mxPoint(v,g)]);m=new mxPoint(m, -a);d&&(c.xv+k?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?M.prototype.fixedSize:M.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,k=a.width,h=a.height,m=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): -mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(v+k,g+e),new mxPoint(v+k,g+h-e),new mxPoint(m,g+h),new mxPoint(v,g+h-e),new mxPoint(v,g+e),new mxPoint(m,g)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+k-e,g),new mxPoint(v+k,a),new mxPoint(v+k-e,g+h),new mxPoint(v+e,g+h),new mxPoint(v,a),new mxPoint(v+e,g)]);m=new mxPoint(m, -a);d&&(c.xv+k?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(oa, +b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?y.prototype.fixedSize:y.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h,g+e),new mxPoint(v+ +h,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g)]):(e=e?Math.max(0,Math.min(.5*h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h,g),new mxPoint(v+h-e,g+k),new mxPoint(v,g+k),new mxPoint(v+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.xv+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style, +"fixedSize","0"),f=e?F.prototype.fixedSize:F.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h-e,g),new mxPoint(v+h,g+k),new mxPoint(v,g+k),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_WEST? +(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h,g),new mxPoint(v+h-e,g+k),new mxPoint(v+e,g+k),new mxPoint(v,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(v+h,g),new mxPoint(v+h,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h,g+e),new mxPoint(v+h,g+k-e),new mxPoint(v,g+k),new mxPoint(v, +g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.xv+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?L.prototype.fixedSize:L.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height,m=a.getCenterX();a=a.getCenterY();b=null!= +b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(v+h-e,g),new mxPoint(v+h,a),new mxPoint(v+h-e,g+k),new mxPoint(v,g+k),new mxPoint(v+e,a),new mxPoint(v,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h,g),new mxPoint(v+h-e,a),new mxPoint(v+ +h,g+k),new mxPoint(v+e,g+k),new mxPoint(v,a),new mxPoint(v+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g+e),new mxPoint(m,g),new mxPoint(v+h,g+e),new mxPoint(v+h,g+k),new mxPoint(m,g+k-e),new mxPoint(v,g+k),new mxPoint(v,g+e)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(m,g+e),new mxPoint(v+h,g),new mxPoint(v+h,g+k-e),new mxPoint(m,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g)]);m=new mxPoint(m, +a);d&&(c.xv+h?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?M.prototype.fixedSize:M.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var v=a.x,g=a.y,h=a.width,k=a.height,m=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): +mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(m,g),new mxPoint(v+h,g+e),new mxPoint(v+h,g+k-e),new mxPoint(m,g+k),new mxPoint(v,g+k-e),new mxPoint(v,g+e),new mxPoint(m,g)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(v+e,g),new mxPoint(v+h-e,g),new mxPoint(v+h,a),new mxPoint(v+h-e,g+k),new mxPoint(v+e,g+k),new mxPoint(v,a),new mxPoint(v+e,g)]);m=new mxPoint(m, +a);d&&(c.xv+h?m.y=c.y:m.x=c.x);return mxUtils.getPerimeterPoint(g,m,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ma);mxUtils.extend(oa, mxShape);oa.prototype.size=10;oa.prototype.inset=2;oa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+v);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-v,f/2);a.quadTo((d-f)/2-v,f+v,d/2,f+v);a.quadTo((d+f)/2+v,f+v,(d+f)/2+v,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",oa);mxUtils.extend(ta, mxShape);ta.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ta);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d, -e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=20;fa.prototype.jettyHeight=10;fa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=Math.min(b,e-b),k=Math.min(g+2*b,e-b);f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c, -k),a.lineTo(v,k),a.lineTo(v,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("module",fa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style, -"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c,k),a.lineTo(v,k),a.lineTo(v,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(va,mxRectangleShape);va.prototype.paintForeground= +e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(fa,mxCylinder);fa.prototype.jettyWidth=20;fa.prototype.jettyHeight=10;fa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=Math.min(b,e-b),h=Math.min(g+2*b,e-b);f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c, +h),a.lineTo(v,h),a.lineTo(v,h+b),a.lineTo(c,h+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("module",fa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var v=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style, +"jettyHeight",this.jettyHeight));c=v/2;var v=c+v/2,g=.3*e-b/2,h=.7*e-b/2;f?(a.moveTo(c,g),a.lineTo(v,g),a.lineTo(v,g+b),a.lineTo(c,g+b),a.moveTo(c,h),a.lineTo(v,h),a.lineTo(v,h+b),a.lineTo(c,h+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.lineTo(c,g+b),a.lineTo(0,g+b),a.lineTo(0,g),a.lineTo(c,g),a.close());a.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(va,mxRectangleShape);va.prototype.paintForeground= function(a,b,c,d,e){var f=d/2,v=e/2,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+v),new mxPoint(b+f,c+e),new mxPoint(b,c+v)],this.isRounded,g,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",va);mxUtils.extend(na,mxDoubleEllipse);na.prototype.outerStroke=!0;na.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4, Math.min(d/5,e/5));0Math.abs(a-e.view.scale)&&b==e.view.translate.x&&d==e.view.translate.y&&c.actions.get(e.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){e.isEnabled()&&(e.isSelectionEmpty()?c.actions.get("smartFit").funct():e.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()})); window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);f.graph.setSelectionCells(f.graph.importGraphModel(c.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=l;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=l;this.addAction("saveAs...",function(){c.saveFile(!0)},null, null,Editor.ctrlKey+"+Shift+S").isEnabled=l;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,240,!0,!0)}).isEnabled=l;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,300,180,!0,!0)},null,"sprite-print", -Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=c.copyXml(),null!=a&&e.removeCells(a,!1)}catch(m){}null==a&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{c.copyXml()}catch(g){}try{mxClipboard.copy(e)}catch(g){c.handleError(g)}}, +Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=c.copyXml(),null!=a&&e.removeCells(a,!1)}catch(m){}null==a&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{c.copyXml()}catch(k){}try{mxClipboard.copy(e)}catch(k){c.handleError(k)}}, null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(c.readGraphModelFromClipboard(function(a){if(null!=a){e.getModel().beginUpdate();try{c.pasteXml(a,!0)}finally{e.getModel().endUpdate()}}else mxClipboard.paste(e)}),a=!0)}catch(m){}a||mxClipboard.paste(e)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function b(a){if(null!=a){for(var b=!0,c=0;c< -a.length&&b;c++)b=b&&e.model.isEdge(a[c]);var d=e.view.translate,c=e.view.scale,f=d.x,g=d.y,d=null;if(1==a.length&&b){var h=e.getCellGeometry(a[0]);null!=h&&(d=h.getTerminalPoint(!0))}d=null!=d?d:e.getBoundingBoxFromGeometry(a,b);null!=d&&(b=Math.round(e.snap(e.popupMenuHandler.triggerX/c-f)),c=Math.round(e.snap(e.popupMenuHandler.triggerY/c-g)),e.cellsMoved(a,b-d.x,c-d.y))}}function d(){e.getModel().beginUpdate();try{b(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){a= +a.length&&b;c++)b=b&&e.model.isEdge(a[c]);var d=e.view.translate,c=e.view.scale,f=d.x,g=d.y,d=null;if(1==a.length&&b){var k=e.getCellGeometry(a[0]);null!=k&&(d=k.getTerminalPoint(!0))}d=null!=d?d:e.getBoundingBoxFromGeometry(a,b);null!=d&&(b=Math.round(e.snap(e.popupMenuHandler.triggerX/c-f)),c=Math.round(e.snap(e.popupMenuHandler.triggerY/c-g)),e.cellsMoved(a,b-d.x,c-d.y))}}function d(){e.getModel().beginUpdate();try{b(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){a= !1;try{Editor.enableNativeCipboard&&(c.readGraphModelFromClipboard(function(a){if(null!=a){e.getModel().beginUpdate();try{b(c.pasteXml(a,!0))}finally{e.getModel().endUpdate()}}else d()}),a=!0)}catch(p){}a||d()}});this.addAction("copySize",function(){var a=e.getSelectionCell();e.isEnabled()&&null!=a&&e.getModel().isVertex(a)&&(a=e.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(e.isEnabled()&&!e.isSelectionEmpty()&& null!=c.copiedSize){e.getModel().beginUpdate();try{for(var a=e.getResizableCells(e.getSelectionCells()),b=0;b/g,"\n"));var k=document.createElement("div");k.innerHTML=e.sanitizeHtml(h);h=mxUtils.extractTextWithWhitespace(k.childNodes);e.cellLabelChanged(state.cell,h);e.setCellStyles("html",a,[b[d]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(e.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"
")),e.cellLabelChanged(state.cell,e.sanitizeHtml(h)),e.setCellStyles("html",a,[b[d]]))}c.fireEvent(new mxEventObject("styleChanged", +!0)})).isEnabled=l;this.addAction("link...",mxUtils.bind(this,function(){if(e.isEnabled())if(e.cellEditor.isContentEditing()){var a=e.getSelectedElement(),b=e.getParentByName(a,"A",e.cellEditor.textarea),d="";if(null==b&&null!=a&&null!=a.getElementsByTagName)for(var f=a.getElementsByTagName("a"),g=0;g/g,"\n"));var h=document.createElement("div");h.innerHTML=e.sanitizeHtml(g);g=mxUtils.extractTextWithWhitespace(h.childNodes);e.cellLabelChanged(state.cell,g);e.setCellStyles("html",a,[b[d]])}else"0"==f&&"1"==a&&(g=mxUtils.htmlEntities(e.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(g=g.replace(/\n/g,"
")),e.cellLabelChanged(state.cell,e.sanitizeHtml(g)),e.setCellStyles("html",a,[b[d]]))}c.fireEvent(new mxEventObject("styleChanged", "keys",["html"],"values",[null!=a?a:"0"],"cells",b))}finally{e.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=e.getView().getState(e.getSelectionCell()),b="wrap";e.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);e.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",b=e.getView().getState(e.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"), function(a){null!=a&&0"))}),d)}c(mxResources.get("normal"),"p");c("","h1").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 1

";c("","h2").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 2

";c("","h3").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 3

";c("","h4").firstChild.nextSibling.innerHTML='

'+mxResources.get("heading")+" 4

";c("","h5").firstChild.nextSibling.innerHTML= '
'+mxResources.get("heading")+" 5
";c("","h6").firstChild.nextSibling.innerHTML='
'+mxResources.get("heading")+" 6
";c("","pre").firstChild.nextSibling.innerHTML='
'+mxResources.get("formatted")+"
";c("","blockquote").firstChild.nextSibling.innerHTML='
'+mxResources.get("blockquote")+"
"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(c,d){var e= [6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(a,b){return a-b}));for(var f=mxUtils.bind(this,function(c){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var d=b.cellEditor.textarea.getElementsByTagName("font"),e=0;emxUtils.indexOf(e,this.customFontSizes[h])&&(k(this.customFontSizes[h]),g++);0mxUtils.indexOf(e,this.customFontSizes[h])&&(g(this.customFontSizes[h]),k++);0"],d=0;d");for(var e=0;e
");c.push("")}c.push("");return c.join("")}function e(a){h=l.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=h){k=l.getParentByName(h,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,k.sectionRowIndex+c),c=Math.min(20,h.cellIndex+c),f=d.rows.length;f"],d=0;d");for(var e=0;e
");c.push("")}c.push("");return c.join("")}function e(a){h=l.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=h){g=l.getParentByName(h,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,g.sectionRowIndex+c),c=Math.min(20,h.cellIndex+c),f=d.rows.length;f';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=f+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width= +Toolbar.prototype.addDropDownArrow=function(a,b,d,c,f,e,l,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=c-(null!=l?l:32)+"px";a.innerHTML='
';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=f+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width= d-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}}; Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}}; Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,d=this.addMenu("",mxResources.get("style"),!0,"formatBlock");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.style.paddingRight="18px",d.getElementsByTagName("img")[0].style.right="1px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"), @@ -3935,63 +3936,62 @@ function(a){null==a||a==mxConstants.NONE?(f.removeAttribute("border"),f.style.bo ("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){f.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=a.addItem("",null,mxUtils.bind(this,function(){var a=f.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0e.div.clientHeight&&(e.div.style.width="40px"); -e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}l=!0;mxEvent.consume(k)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){l=this.currentElt!=a;b.preventDefault()}))}}; -Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,d,c){function f(){var b=l.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!= -b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),k(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var l=document.createElement("input");l.style.marginBottom="10px";mxClient.IS_IE&&(l.style.marginTop="10px",document.body.appendChild(l));var k=null!=d?d:this.createApplyFunction(); -this.init=function(){mxClient.IS_TOUCH||l.focus()};var h=new mxJSColor.color(l);h.pickerOnfocus=!1;h.showPicker();d=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";d.appendChild(mxJSColor.picker.box);var g=document.createElement("center"),m=mxUtils.bind(this,function(a,b,c,d){b=null!=b?b:12;var k=document.createElement("table");k.style.borderCollapse= -"collapse";k.setAttribute("cellspacing","0");k.style.marginBottom="20px";k.style.cellSpacing="0px";k.style.marginLeft="1px";var m=document.createElement("tbody");k.appendChild(m);for(var n=a.length/b,p=0;pe.div.clientHeight&&(e.div.style.width="40px");e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu(); +e.destroy()});var h=mxUtils.getOffset(a);e.popup(h.x,h.y+a.offsetHeight,null,g);this.editorUi.setCurrentMenu(e,a)}l=!0;mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){l=null==e||null==e.div||null==e.div.parentNode;a.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,d,c){function f(){var b=l.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!= +b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),g(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var l=document.createElement("input");l.style.marginBottom="10px";mxClient.IS_IE&&(l.style.marginTop="10px",document.body.appendChild(l));var g=null!=d?d:this.createApplyFunction(); +this.init=function(){mxClient.IS_TOUCH||l.focus()};var h=new mxJSColor.color(l);h.pickerOnfocus=!1;h.showPicker();d=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";d.appendChild(mxJSColor.picker.box);var k=document.createElement("center"),m=mxUtils.bind(this,function(a,b,c,d){b=null!=b?b:12;var g=document.createElement("table");g.style.borderCollapse= +"collapse";g.setAttribute("cellspacing","0");g.style.marginBottom="20px";g.style.cellSpacing="0px";g.style.marginLeft="1px";var m=document.createElement("tbody");g.appendChild(m);for(var n=a.length/b,p=0;p=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");b.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(d);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);d=document.createElement("a");d.setAttribute("href", -"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";b.appendChild(d);this.container=b},TextareaDialog=function(a,b,d,c,f,e,l,k,h,g,m,n,p,q,r){g=null!=g?g:!1;l=document.createElement("div");l.style.position="absolute";l.style.top="20px";l.style.bottom="20px";l.style.left="20px";l.style.right="20px";k=document.createElement("div"); -k.style.position="absolute";k.style.left="0px";k.style.right="0px";var u=k.cloneNode(!1),t=k.cloneNode(!1);k.style.top="0px";k.style.height="20px";u.style.top="20px";u.style.bottom="64px";t.style.bottom="0px";t.style.height="60px";t.style.textAlign="center";mxUtils.write(k,b);l.appendChild(k);l.appendChild(u);l.appendChild(t);null!=r&&k.appendChild(r);var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete", +"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";b.appendChild(d);this.container=b},TextareaDialog=function(a,b,d,c,f,e,l,g,h,k,m,n,p,q,r){k=null!=k?k:!1;l=document.createElement("div");l.style.position="absolute";l.style.top="20px";l.style.bottom="20px";l.style.left="20px";l.style.right="20px";g=document.createElement("div"); +g.style.position="absolute";g.style.left="0px";g.style.right="0px";var u=g.cloneNode(!1),t=g.cloneNode(!1);g.style.top="0px";g.style.height="20px";u.style.top="20px";u.style.bottom="64px";t.style.bottom="0px";t.style.height="60px";t.style.textAlign="center";mxUtils.write(g,b);l.appendChild(g);l.appendChild(u);l.appendChild(t);null!=r&&g.appendChild(r);var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete", "off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.outline="none";w.style.position="absolute";w.style.boxSizing="border-box";w.style.top="0px";w.style.left="0px";w.style.height="100%";w.style.width="100%";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};u.appendChild(w);null!=p&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),b.className="geBtn",t.appendChild(b));if(null!=q)for(b=0;bMAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var c=a.editor.graph,f=c.getGraphBounds(),e=c.view.scale,l=Math.ceil(f.width/ -e),k=Math.ceil(f.height/e),h,e=document.createElement("table"),g=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h,mxResources.get("filename")+":");f.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);f.appendChild(h); -g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");f.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value","png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h)); +e),g=Math.ceil(f.height/e),h,e=document.createElement("table"),k=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";h.style.width="100px";mxUtils.write(h,mxResources.get("filename")+":");f.appendChild(h);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";h=document.createElement("td");h.appendChild(m);f.appendChild(h); +k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("format")+":");f.appendChild(h);var n=document.createElement("select");n.style.width="180px";h=document.createElement("option");h.setAttribute("value","png");mxUtils.write(h,mxResources.get("formatPng"));n.appendChild(h);h=document.createElement("option");ExportDialog.showGifOption&&(h.setAttribute("value","gif"),mxUtils.write(h,mxResources.get("formatGif")),n.appendChild(h)); h=document.createElement("option");h.setAttribute("value","jpg");mxUtils.write(h,mxResources.get("formatJpg"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","pdf");mxUtils.write(h,mxResources.get("formatPdf"));n.appendChild(h);h=document.createElement("option");h.setAttribute("value","svg");mxUtils.write(h,mxResources.get("formatSvg"));n.appendChild(h);ExportDialog.showXmlOption&&(h=document.createElement("option"),h.setAttribute("value","xml"),mxUtils.write(h,mxResources.get("formatXml")), -n.appendChild(h));h=document.createElement("td");h.appendChild(n);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");f.appendChild(h);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td"); -h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");f.appendChild(h);var q=document.createElement("input");q.setAttribute("value",l);q.style.width="180px";h=document.createElement("td");h.appendChild(q);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");f.appendChild(h);var r=document.createElement("input");r.setAttribute("value",k);r.style.width="180px";h=document.createElement("td"); -h.appendChild(r);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("dpi")+":");f.appendChild(h);var u=document.createElement("select");u.style.width="180px";h=document.createElement("option");h.setAttribute("value","100");mxUtils.write(h,"100dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","200");mxUtils.write(h,"200dpi");u.appendChild(h);h=document.createElement("option"); +n.appendChild(h));h=document.createElement("td");h.appendChild(n);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("zoom")+" (%):");f.appendChild(h);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";h=document.createElement("td");h.appendChild(p);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td"); +h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("width")+":");f.appendChild(h);var q=document.createElement("input");q.setAttribute("value",l);q.style.width="180px";h=document.createElement("td");h.appendChild(q);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("height")+":");f.appendChild(h);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";h=document.createElement("td"); +h.appendChild(r);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("dpi")+":");f.appendChild(h);var u=document.createElement("select");u.style.width="180px";h=document.createElement("option");h.setAttribute("value","100");mxUtils.write(h,"100dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","200");mxUtils.write(h,"200dpi");u.appendChild(h);h=document.createElement("option"); h.setAttribute("value","300");mxUtils.write(h,"300dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","400");mxUtils.write(h,"400dpi");u.appendChild(h);h=document.createElement("option");h.setAttribute("value","custom");mxUtils.write(h,mxResources.get("custom"));u.appendChild(h);var t=document.createElement("input");t.style.width="180px";t.style.display="none";t.setAttribute("value","100");t.setAttribute("type","number");t.setAttribute("min","50");t.setAttribute("step", -"50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):(t.value=this.value,w||(p.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",w||(p.value=a))});h=document.createElement("td");h.appendChild(u);h.appendChild(t);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize= -"10pt";mxUtils.write(h,mxResources.get("background")+":");f.appendChild(h);var x=document.createElement("input");x.setAttribute("type","checkbox");x.checked=null==c.background||c.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(x);mxUtils.write(h,mxResources.get("transparent"));f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("grid")+":");f.appendChild(h);var y=document.createElement("input"); -y.setAttribute("type","checkbox");y.checked=!1;h=document.createElement("td");h.appendChild(y);f.appendChild(h);g.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");f.appendChild(h);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("value",ExportDialog.lastBorderValue);F.style.width="180px";h=document.createElement("td");h.appendChild(F);f.appendChild(h);g.appendChild(f); -e.appendChild(g);mxEvent.addListener(n,"change",b);b();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(F.value)), -g=c.background,h=Math.max(1,parseInt(t.value));if(("svg"==d||"png"==d||"pdf"==d)&&x.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,d,g,e,f,h,y.checked)}}));H.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(h.appendChild(C),h.appendChild(H)):(h.appendChild(H),h.appendChild(C));f.appendChild(h);g.appendChild(f);e.appendChild(g); +"50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):(t.value=this.value,w||(p.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",w||(p.value=a))});h=document.createElement("td");h.appendChild(u);h.appendChild(t);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize= +"10pt";mxUtils.write(h,mxResources.get("background")+":");f.appendChild(h);var x=document.createElement("input");x.setAttribute("type","checkbox");x.checked=null==c.background||c.background==mxConstants.NONE;h=document.createElement("td");h.appendChild(x);mxUtils.write(h,mxResources.get("transparent"));f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("grid")+":");f.appendChild(h);var y=document.createElement("input"); +y.setAttribute("type","checkbox");y.checked=!1;h=document.createElement("td");h.appendChild(y);f.appendChild(h);k.appendChild(f);f=document.createElement("tr");h=document.createElement("td");h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("borderWidth")+":");f.appendChild(h);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("value",ExportDialog.lastBorderValue);F.style.width="180px";h=document.createElement("td");h.appendChild(F);f.appendChild(h);k.appendChild(f); +e.appendChild(k);mxEvent.addListener(n,"change",b);b();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(F.value)), +g=c.background,h=Math.max(1,parseInt(t.value));if(("svg"==d||"png"==d||"pdf"==d)&&x.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,d,g,e,f,h,y.checked)}}));H.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(h.appendChild(C),h.appendChild(H)):(h.appendChild(H),h.appendChild(C));f.appendChild(h);k.appendChild(f);e.appendChild(k); this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; -ExportDialog.exportFile=function(a,b,d,c,f,e,l,k){k=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(k.getSvg(c,f,e)),b,d);else{var h=k.getGraphBounds(),g=mxUtils.createXmlDocument(),m=g.createElement("output");g.appendChild(m);g=new mxXmlCanvas2D(m);g.translate(Math.floor((e/f-h.x)/k.view.scale),Math.floor((e/f-h.y)/k.view.scale));g.scale(f/k.view.scale);(new mxImageExport).drawState(k.getView().getState(k.model.root), -g);m="xml="+encodeURIComponent(mxUtils.getXml(m));g=Math.ceil(h.width*f/k.view.scale+2*e);f=Math.ceil(h.height*f/k.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&g*fb.name?1:0});if(null!=r){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign= -"center";mxUtils.write(m,r);var x=g.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(c){mxEvent.isShiftDown(c)&&(c=new FilenameDialog(a,r,mxResources.get("apply"),mxUtils.bind(this,function(c){null!=c&&0b.name?1:0});if(null!=r){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign= +"center";mxUtils.write(m,r);var x=k.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(c){mxEvent.isShiftDown(c)&&(c=new FilenameDialog(a,r,mxResources.get("apply"),mxUtils.bind(this,function(c){null!=c&&0a.indexOf(":"))try{var b=mxUtils.indexOf(n,a);if(0<=b&&null!=p[b])p[b].focus();else{e.cloneNode(!1).setAttribute(a, -"");0<=b&&(n.splice(b,1),p.splice(b,1));n.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";p.push(c);u(c,a);c.focus()}F.setAttribute("disabled","disabled");y.value=""}catch(G){mxUtils.alert(G)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(y,"keypress",function(a){13==a.keyCode&&F.click()});this.init=function(){0")});mxEvent.addListener(f,"dragend",function(a){null!=p&&null!=q&&h.addCell(c,h.model.root,q);q=p=null;a.stopPropagation();a.preventDefault()});var k=document.createElement("img"); k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 4px";k.style.marginTop="2px";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(h.model.isVisible(c)?"hide":"show"));h.model.isVisible(c)?(k.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(f,75)):(k.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(f,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");g.appendChild(k); mxEvent.addListener(k,"click",function(a){h.model.setVisible(c,!h.model.isVisible(c));mxEvent.consume(a)});k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 0";k.style.marginTop="2px";k.setAttribute("title",mxResources.get("lockUnlock"));var l=h.getCurrentCellStyle(c);"1"==mxUtils.getValue(l,"locked","0")?(k.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(k,75)):(k.setAttribute("src", @@ -4014,17 +4014,17 @@ b);k.style.display="block";k.style.whiteSpace="nowrap";k.style.overflow="hidden" "6px",0'),c.writeln(Editor.mathJaxWebkitCss), +m=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),z=0,v=0,p=O.get(),y=1/d.pageScale,F=E.checked;if(F)var y=parseInt(C.value),G=parseInt(B.value),y=Math.min(p.height*G/(l.height/d.view.scale),p.width*y/(l.width/d.view.scale));else y=parseInt(x.value)/(100*d.pageScale),isNaN(y)&&(g=1/d.pageScale,x.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width* +g);p.height=Math.ceil(p.height*g);y*=g;!F&&d.pageVisible?(l=d.getPageLayout(),z-=l.x*p.width,v-=l.y*p.height):F=!0;if(null==c){c=PrintDialog.createPrintPreview(d,y,p,0,z,v,F);c.pageSelector=!1;c.mathEnabled=!1;u.checked&&(c.isCellVisible=function(b){return d.isCellSelected(b)});z=b.getCurrentFile();null!=z&&(c.title=z.getTitle());var D=c.writeHead;c.writeHead=function(c){D.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('");mxClient.IS_GC&&(c.writeln('"));null!=b.editor.fontCss&&(c.writeln('"));for(var g=d.getCustomFonts(),e=0;e'): (c.writeln('"))}};if("undefined"!==typeof MathJax){var A=c.renderPage;c.renderPage=function(d,c,g,e,k,f){var n=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var q=A.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled|| !0:q.className="geDisableMathJax";return q}}z=null;v=e.shapeForegroundColor;F=e.shapeBackgroundColor;p=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(z=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.shapeForegroundColor="#000000",e.shapeBackgroundColor="#ffffff",e.refresh());c.open(null,null,k,!0);e.enableFlowAnimation=p;null!=z&&(e.shapeForegroundColor=v,e.shapeBackgroundColor=F,e.stylesheet=z,e.refresh())}else{p=d.background;if(null==p||""== @@ -11678,7 +11678,7 @@ this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.colo this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var X=document.createElement("canvas"),U=new Image;U.onload=function(){try{X.getContext("2d").drawImage(U,0,0);var b=X.toDataURL("image/png");Editor.prototype.useCanvasForExport= null!=b&&6
')))}catch(L){}})(); (function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,f,c){c.ui=b.ui;return f};b.afterDecode=function(b,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})(); -(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,f,c){c.ui=b.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= +(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,f,c){c.ui=b.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&& "1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35, mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,f,t,q,m){q=null!=q?q:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&& @@ -12037,10 +12037,10 @@ b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute(" "click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b); this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container, 640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;fmxUtils.indexOf(g,R)&&g.push(R),p.fireEvent(new mxEventObject("cellsInserted","cells",[R]))):p.fireEvent(new mxEventObject("cellsInserted","cells",[fa]));R=fa;if(!d)for(ca=0;cap.clientWidth?"hidden":"";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus());if("1"!=urlParams.embed)if(0==l.statusContainer.children.length||1==l.statusContainer.children.length&&"function"===typeof l.statusContainer.firstChild.getAttribute&&null==l.statusContainer.firstChild.getAttribute("class")){var b=null!=l.statusContainer.firstChild&&"function"===typeof l.statusContainer.firstChild.getAttribute? -l.statusContainer.firstChild.getAttribute("title"):l.editor.getStatus();aa(b);var c=l.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(l.statusContainer.innerHTML='',l.statusContainer.style.display="inline-block",S=!0):6p.clientWidth&&!S?"hidden":""}));Q=d("diagram",null,Editor.menuImage);Q.style.boxShadow="none";Q.style.padding="6px";Q.style.margin="0px";V.appendChild(Q);mxEvent.disableContextMenu(Q);mxEvent.addGestureListeners(Q,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);l.statusContainer.style.position="";l.statusContainer.style.display="none"; -l.statusContainer.style.margin="0px";l.statusContainer.style.padding="6px 0px";l.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";l.statusContainer.style.display="inline-block";l.statusContainer.style.textOverflow="ellipsis";l.buttonContainer.style.position="";l.buttonContainer.style.paddingRight="0px";l.buttonContainer.style.display="inline-block";var N=document.createElement("a");N.style.padding="0px";N.style.boxShadow="none";N.className="geMenuItem";N.style.display="inline-block";N.style.width= -"40px";N.style.height="12px";N.style.marginBottom="-2px";N.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";N.style.backgroundPosition="top center";N.style.backgroundRepeat="no-repeat";N.setAttribute("title","Minimize");var ea=!1,Y=mxUtils.bind(this,function(){B.innerHTML="";if(!ea){var b=function(b,d,f){b=e("",b.funct,null,d,b,f);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default"; -b.style.margin="2px 0px";B.appendChild(b);mxUtils.br(B);return b};c(l.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(l.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", +b):l.notificationBtn.removeAttribute("title"))});p.style.visibility=20>p.clientWidth?"hidden":"";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus());if("1"!=urlParams.embed)if(l.statusContainer.style.display="inline-block",S=!0,1==l.statusContainer.children.length&&""==l.editor.getStatus())p.style.visibility="hidden";else{if(0==l.statusContainer.children.length||1==l.statusContainer.children.length&&"function"===typeof l.statusContainer.firstChild.getAttribute&& +null==l.statusContainer.firstChild.getAttribute("class")){var b=null!=l.statusContainer.firstChild&&"function"===typeof l.statusContainer.firstChild.getAttribute?l.statusContainer.firstChild.getAttribute("title"):l.editor.getStatus();aa(b);var c=l.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(l.statusContainer.innerHTML='',l.statusContainer.style.display= +"inline-block",S=!0):6p.clientWidth&&!S?"hidden":""}}));Q=d("diagram",null,Editor.menuImage);Q.style.boxShadow="none";Q.style.padding="6px";Q.style.margin="0px";V.appendChild(Q);mxEvent.disableContextMenu(Q);mxEvent.addGestureListeners(Q,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)|| +mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);l.statusContainer.style.position="";l.statusContainer.style.display="none";l.statusContainer.style.margin="0px";l.statusContainer.style.padding="6px 0px";l.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";l.statusContainer.style.display="inline-block";l.statusContainer.style.textOverflow="ellipsis";l.buttonContainer.style.position="";l.buttonContainer.style.paddingRight="0px";l.buttonContainer.style.display= +"inline-block";var N=document.createElement("a");N.style.padding="0px";N.style.boxShadow="none";N.className="geMenuItem";N.style.display="inline-block";N.style.width="40px";N.style.height="12px";N.style.marginBottom="-2px";N.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";N.style.backgroundPosition="top center";N.style.backgroundRepeat="no-repeat";N.setAttribute("title","Minimize");var ea=!1,Y=mxUtils.bind(this,function(){B.innerHTML="";if(!ea){var b=function(b,d,f){b=e("",b.funct, +null,d,b,f);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";B.appendChild(b);mxUtils.br(B);return b};c(l.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(l.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", 140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));c(l.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(l.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,n.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"); b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(l.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=n.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0, 20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(l.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(l.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var f=l.actions.get("toggleShapes");b(f,mxResources.get("shapes")+" ("+f.shortcut+ diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js index e84a89a8ea..cedf52466d 100644 --- a/src/main/webapp/js/viewer-static.min.js +++ b/src/main/webapp/js/viewer-static.min.js @@ -109,7 +109,7 @@ a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);w if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0"; "se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1"); "embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images"; -window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), +window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.0.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"), IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor), IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2navigator.userAgent.indexOf("Firefox/1.")&& 0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!== @@ -1967,7 +1967,7 @@ Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4="; Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0; Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8D.clientHeight-u&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage), -l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=H+14+"px",l.style.left=G+e+38-m+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!q)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){F=!0}),null,mxUtils.bind(this,function(d){F&&(b.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var k=g(); +l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=H+14+"px",l.style.left=G+e+38-m+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!t)){var F=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){F=!0}),null,mxUtils.bind(this,function(d){F&&(b.hideDialog(!0),F=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var k=g(); null!=k&&(p=e=k.w,v=f=k.h)}k=mxUtils.getDocumentSize();y=k.height;this.bg.style.height=y+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");G=Math.max(1,Math.round((k.width-e-u)/2));H=Math.max(1,Math.round((y-f-b.footerHeight)/3));e=null!=document.body?Math.min(p,document.body.scrollWidth-u):p;f=Math.min(v,y-u);k=this.getPosition(G,H,e,f);G=k.x;H=k.y;D.style.left=G+"px";D.style.top=H+"px";D.style.width=e+"px";D.style.height=f+"px";!d&& -c.clientHeight>D.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=G+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; +c.clientHeight>D.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=G+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ "/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(b,c,e,f,n,l,t,d,k,g,q){k=null!=k?k:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);m.appendChild(p)}c= -document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;m.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=l&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();l()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=q&&q()}),g.className="geBtn",e.appendChild(g));var v=mxUtils.button(f,function(){k&&b.hideDialog();null!=n&&n()}); -v.className="geBtn";e.appendChild(v);null!=t&&(f=mxUtils.button(t,function(){k&&b.hideDialog();null!=d&&d()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){v.focus()};m.appendChild(e);this.container=m},PrintDialog=function(b,c){this.create(b,c)}; -PrintDialog.prototype.create=function(b){function c(b){var c=d.checked||g.checked,k=parseInt(m.value)/100;isNaN(k)&&(k=1,m.value="100%");var k=.75*k,f=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/e.pageScale;if(c){var p=d.checked?1:parseInt(q.value);isNaN(p)||(l=mxUtils.getScaleForPageCount(p,e,f))}e.getGraphBounds();var v=p=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*k);f.height=Math.ceil(f.height*k);l*=k;!c&&e.pageVisible?(k=e.getPageLayout(),p-=k.x*f.width,v-=k.y*f.height): -c=!0;c=PrintDialog.createPrintPreview(e,l,f,0,p,v,c);c.open();b&&PrintDialog.printPreview(c)}var e=b.editor.graph,f,n,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var t=document.createElement("tbody");f=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(d);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage")); -n.appendChild(k);mxEvent.addListener(k,"click",function(b){d.checked=!d.checked;g.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){g.checked=!d.checked});f.appendChild(n);t.appendChild(f);f=f.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(g);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");n.appendChild(k);mxEvent.addListener(k, -"click",function(b){g.checked=!g.checked;d.checked=!g.checked;mxEvent.consume(b)});f.appendChild(n);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(q);mxUtils.write(n," "+mxResources.get("pages")+" (max)");f.appendChild(n);t.appendChild(f);mxEvent.addListener(g,"change", -function(){g.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!g.checked});f=f.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");f.appendChild(n);n=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";n.appendChild(m);f.appendChild(n);t.appendChild(f);f=document.createElement("tr");n=document.createElement("td");n.colSpan=2; +var ErrorDialog=function(b,c,e,f,n,l,q,d,k,g,t){k=null!=k?k:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);m.appendChild(p)}c= +document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;m.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=l&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();l()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=t&&t()}),g.className="geBtn",e.appendChild(g));var v=mxUtils.button(f,function(){k&&b.hideDialog();null!=n&&n()}); +v.className="geBtn";e.appendChild(v);null!=q&&(f=mxUtils.button(q,function(){k&&b.hideDialog();null!=d&&d()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){v.focus()};m.appendChild(e);this.container=m},PrintDialog=function(b,c){this.create(b,c)}; +PrintDialog.prototype.create=function(b){function c(b){var c=d.checked||g.checked,k=parseInt(m.value)/100;isNaN(k)&&(k=1,m.value="100%");var k=.75*k,f=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/e.pageScale;if(c){var p=d.checked?1:parseInt(t.value);isNaN(p)||(l=mxUtils.getScaleForPageCount(p,e,f))}e.getGraphBounds();var v=p=0,f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*k);f.height=Math.ceil(f.height*k);l*=k;!c&&e.pageVisible?(k=e.getPageLayout(),p-=k.x*f.width,v-=k.y*f.height): +c=!0;c=PrintDialog.createPrintPreview(e,l,f,0,p,v,c);c.open();b&&PrintDialog.printPreview(c)}var e=b.editor.graph,f,n,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var q=document.createElement("tbody");f=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(d);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("fitPage")); +n.appendChild(k);mxEvent.addListener(k,"click",function(b){d.checked=!d.checked;g.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){g.checked=!d.checked});f.appendChild(n);q.appendChild(f);f=f.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(g);k=document.createElement("span");mxUtils.write(k," "+mxResources.get("posterPrint")+":");n.appendChild(k);mxEvent.addListener(k, +"click",function(b){g.checked=!g.checked;d.checked=!g.checked;mxEvent.consume(b)});f.appendChild(n);var t=document.createElement("input");t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.setAttribute("size","4");t.setAttribute("disabled","disabled");t.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(t);mxUtils.write(n," "+mxResources.get("pages")+" (max)");f.appendChild(n);q.appendChild(f);mxEvent.addListener(g,"change", +function(){g.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled");d.checked=!g.checked});f=f.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");f.appendChild(n);n=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";n.appendChild(m);f.appendChild(n);q.appendChild(f);f=document.createElement("tr");n=document.createElement("td");n.colSpan=2; n.style.paddingTop="20px";n.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&n.appendChild(k);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});p.className="geBtn";n.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";n.appendChild(p);b.editor.cancelFirst|| -n.appendChild(k);f.appendChild(n);t.appendChild(f);l.appendChild(t);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}}; -PrintDialog.createPrintPreview=function(b,c,e,f,n,l,t){c=new mxPrintPreview(b,c,e,f,n,l);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('")};return c}; +n.appendChild(k);f.appendChild(n);q.appendChild(f);l.appendChild(q);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}}; +PrintDialog.createPrintPreview=function(b,c,e,f,n,l,q){c=new mxPrintPreview(b,c,e,f,n,l);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('")};return c}; PrintDialog.previewEnabled=!0; -var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=q,g.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var f=b.editor.graph,n,l,t=document.createElement("table");t.style.width= -"100%";t.style.height="100%";var d=document.createElement("tbody");n=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");n.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",f.pageFormat);n.appendChild(l);d.appendChild(n);n=document.createElement("tr");l=document.createElement("td"); -mxUtils.write(l,mxResources.get("background")+":");n.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var q=f.background;c();mxEvent.addListener(g, -"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});l.appendChild(g);mxUtils.write(l,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=f.getGridSize();l.appendChild(m);mxEvent.addListener(m,"change",function(){var b=parseInt(m.value);m.value=Math.max(1,isNaN(b)?f.getGridSize():b)});n.appendChild(l);d.appendChild(n);n=document.createElement("tr"); +var PageSetupDialog=function(b){function c(){null==t||t==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=t,g.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var f=b.editor.graph,n,l,q=document.createElement("table");q.style.width= +"100%";q.style.height="100%";var d=document.createElement("tbody");n=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");n.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var k=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",f.pageFormat);n.appendChild(l);d.appendChild(n);n=document.createElement("tr");l=document.createElement("td"); +mxUtils.write(l,mxResources.get("background")+":");n.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var t=f.background;c();mxEvent.addListener(g, +"click",function(d){b.pickColor(t||"none",function(b){t=b;c()});mxEvent.consume(d)});l.appendChild(g);mxUtils.write(l,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=f.getGridSize();l.appendChild(m);mxEvent.addListener(m,"change",function(){var b=parseInt(m.value);m.value=Math.max(1,isNaN(b)?f.getGridSize():b)});n.appendChild(l);d.appendChild(n);n=document.createElement("tr"); l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+":");n.appendChild(l);l=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height= "60px";v.style.padding="4px";var u=f.backgroundImage,x=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(p,"click",x);mxEvent.addListener(v,"click",x);e();l.appendChild(v);l.appendChild(p);n.appendChild(l);d.appendChild(n);n=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn"; -b.editor.cancelFirst&&l.appendChild(p);x=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(m.value);isNaN(d)||f.gridSize===d||f.setGridSize(d);d=new ChangePageSetup(b,q,u,k.get());d.ignoreColor=f.background==q;d.ignoreImage=(null!=f.backgroundImage?f.backgroundImage.src:null)===(null!=u?u.src:null);f.pageFormat.width==d.previousFormat.width&&f.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||f.model.execute(d)});x.className="geBtn gePrimaryBtn"; -l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);n.appendChild(l);d.appendChild(n);t.appendChild(d);this.container=t}; +b.editor.cancelFirst&&l.appendChild(p);x=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(m.value);isNaN(d)||f.gridSize===d||f.setGridSize(d);d=new ChangePageSetup(b,t,u,k.get());d.ignoreColor=f.background==t;d.ignoreImage=(null!=f.backgroundImage?f.backgroundImage.src:null)===(null!=u?u.src:null);f.pageFormat.width==d.previousFormat.width&&f.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||f.model.execute(d)});x.className="geBtn gePrimaryBtn"; +l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);n.appendChild(l);d.appendChild(n);q.appendChild(d);this.container=q}; PageSetupDialog.addPageFormatPanel=function(b,c,e,f){function n(b,c,g){if(g||m!=document.activeElement&&p!=document.activeElement){b=!1;for(c=0;c=g)m.value=e.width/100;g=parseFloat(p.value);if(isNaN(g)||0>=g)p.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)), -Math.floor(100*parseFloat(p.value)));"custom"!=d.value&&t.checked&&(g=new mxRectangle(0,0,g.height,g.width));c&&H||g.width==D.width&&g.height==D.height||(D=g,null!=f&&f(D))};mxEvent.addListener(c,"click",function(b){l.checked=!0;F(b);mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){t.checked=!0;F(b);mxEvent.consume(b)});mxEvent.addListener(m,"blur",F);mxEvent.addListener(m,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(t,"change",F);mxEvent.addListener(l, +e.height==g.format.height?(d.value=g.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,b=!0):e.width==g.format.height&&e.height==g.format.width&&(d.value=g.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,b=q.checked=!0));b?(k.style.display="",t.style.display="none"):(m.value=e.width/100,p.value=e.height/100,l.setAttribute("checked","checked"), +d.value="custom",k.style.display="none",t.style.display="")}}c="format-"+c;var l=document.createElement("input");l.setAttribute("name",c);l.setAttribute("type","radio");l.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";var k= +document.createElement("div");k.style.marginLeft="4px";k.style.width="210px";k.style.height="24px";l.style.marginRight="6px";k.appendChild(l);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";k.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));k.appendChild(g);var t=document.createElement("div");t.style.marginLeft= +"4px";t.style.width="210px";t.style.height="24px";var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";t.appendChild(m);mxUtils.write(t," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";t.appendChild(p);mxUtils.write(t," in");k.style.display="none";t.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),x=0;x=g)m.value=e.width/100;g=parseFloat(p.value);if(isNaN(g)||0>=g)p.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)), +Math.floor(100*parseFloat(p.value)));"custom"!=d.value&&q.checked&&(g=new mxRectangle(0,0,g.height,g.width));c&&H||g.width==D.width&&g.height==D.height||(D=g,null!=f&&f(D))};mxEvent.addListener(c,"click",function(b){l.checked=!0;F(b);mxEvent.consume(b)});mxEvent.addListener(g,"click",function(b){q.checked=!0;F(b);mxEvent.consume(b)});mxEvent.addListener(m,"blur",F);mxEvent.addListener(m,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(l, "change",F);mxEvent.addListener(d,"change",function(b){H="custom"==d.value;F(b,!0)});F();return{set:function(b){e=b;n(null,null,!0)},get:function(){return D},widthInput:m,heightInput:p}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]}; -var FilenameDialog=function(b,c,e,f,n,l,t,d,k,g,q,m){k=null!=k?k:!0;var p,v,u=document.createElement("table"),x=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";p=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(n||mxResources.get("filename"))+":");p.appendChild(v);var y=document.createElement("input"); -y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width=null!=m?m+"px":"180px";var G=mxUtils.button(e,function(){if(null==l||l(y.value))k&&b.hideDialog(),f(y.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=n||null==t)if(y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?y.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor= +var FilenameDialog=function(b,c,e,f,n,l,q,d,k,g,t,m){k=null!=k?k:!0;var p,v,u=document.createElement("table"),x=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";p=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(n||mxResources.get("filename"))+":");p.appendChild(v);var y=document.createElement("input"); +y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width=null!=m?m+"px":"180px";var G=mxUtils.button(e,function(){if(null==l||l(y.value))k&&b.hideDialog(),f(y.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=n||null==q)if(y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?y.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor= "",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments); if(null!=this.shiftPreview1){var k=this.view.canvas;null!=k.ownerSVGElement&&(k=k.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+c,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";k.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(b,d,c){var g=this.view.scale,k=this.view.translate,e=this.pageFormat,f=g*this.pageScale,l=this.view.getBackgroundPageBounds(); -d=l.width;c=l.height;var u=new mxRectangle(g*k.x,g*k.y,e.width*f,e.height*f),n=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(c/u.height)-1:0,t=b?Math.ceil(d/u.width)-1:0,G=l.x+d,H=l.y+c;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(c/u.height)-1:0,q=b?Math.ceil(d/u.width)-1:0,G=l.x+d,H=l.y+c;null==this.horizontalPageBreaks&&0mxUtils.indexOf(l,k[c])&&l.push(k[c]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),q=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"], -["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(c=0;cmxUtils.indexOf(l,t[c])&&l.push(t[c]);var m=function(b,c,g,k,e,m,p){k=null!=k?k:f.currentVertexStyle;e=null!=e?e:f.currentEdgeStyle;m=null!=m?m:!0;g=null!=g?g:f.getModel();if(p){p=[];for(var B=0;BmxUtils.indexOf(d,A))&& +f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var k=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;cmxUtils.indexOf(l,k[c])&&l.push(k[c]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),t=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"], +["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(c=0;cmxUtils.indexOf(l,q[c])&&l.push(q[c]);var m=function(b,c,g,k,e,m,p){k=null!=k?k:f.currentVertexStyle;e=null!=e?e:f.currentEdgeStyle;m=null!=m?m:!0;g=null!=g?g:f.getModel();if(p){p=[];for(var B=0;BmxUtils.indexOf(d,A))&& (C=mxUtils.setStyle(C,A,V))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));g.setStyle(u,C)}}finally{g.endUpdate()}return b};f.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"),null,null,null,null,!0,!0)});f.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=m;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return f.isEditing()||null!= b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown= p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):f.panningHandler.usePopupTrigger=!1;f.init(this.diagramContainer); @@ -2074,8 +2074,8 @@ D!=f.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild, f.cellEditor.startEditing=function(){J.apply(this,arguments);C();if(f.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=f.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=E.toolbar&&(E.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),E.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},0))};mxEvent.addListener(f.cellEditor.textarea,"input",d);mxEvent.addListener(f.cellEditor.textarea,"touchend",d);mxEvent.addListener(f.cellEditor.textarea, "mouseup",d);mxEvent.addListener(f.cellEditor.textarea,"keyup",d);d()}};var N=f.cellEditor.stopEditing;f.cellEditor.stopEditing=function(b,d){try{N.apply(this,arguments),C()}catch(X){E.handleError(X)}};f.container.setAttribute("tabindex","0");f.container.style.cursor="default";if(window.self===window.top&&null!=f.container.parentNode)try{f.container.focus()}catch(Q){}var M=f.fireMouseEvent;f.fireMouseEvent=function(b,d,c){b==mxEvent.MOUSE_DOWN&&this.container.focus();M.apply(this,arguments)};f.popupMenuHandler.autoExpand= !0;null!=this.menus&&(f.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,c){this.menus.createPopupMenu(b,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){f.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};f.connectionHandler.addListener(mxEvent.CONNECT,function(b,d){var c=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(c.push(d.getProperty("terminal")),window.setTimeout(function(){null!= -E.hoverIcons&&E.hoverIcons.update(f.view.getState(c[c.length-1]))},0));m(c)});this.addListener("styleChanged",mxUtils.bind(this,function(b,d){var c=d.getProperty("cells"),e=!1,q=!1;if(0=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0; EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1; EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var c=b.getRubberband();null!=c&&c.cancel()}));mxEvent.addListener(b.container, @@ -2091,24 +2091,24 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0" arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState}; EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,c=b.getSelectionCells(),e=this.initSelectionState(),f=!0,n=0;nt.length?35*t.length:140;k.className="geToolbarContainer geSidebarContainer";k.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ -mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(k.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(k.style.backgroundColor=q.background);q.container.appendChild(k);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";k.appendChild(e);null!=m&&"1"!=urlParams.sketch? -this.sidebar.graph.pasteStyle(m,[d]):g.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var k=q.cloneCell(d);if(null!=f)f(k);else{k.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);k.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(k)}finally{q.model.endUpdate()}q.setSelectionCell(k); -q.scrollCellToVisible(k);q.startEditingAtCell(k);null!=g.hoverIcons&&g.hoverIcons.update(q.view.getState(k))}null!=l&&l()})});for(n=0;n<(d?Math.min(t.length,4):t.length);n++)e(t[n]);t=k.offsetTop+k.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0q.length?35*q.length:140;k.className="geToolbarContainer geSidebarContainer";k.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+ +mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(k.style,"transform","translate(-22px,-22px)");null!=t.background&&t.background!=mxConstants.NONE&&(k.style.backgroundColor=t.background);t.container.appendChild(k);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";k.appendChild(e);null!=m&&"1"!=urlParams.sketch? +this.sidebar.graph.pasteStyle(m,[d]):g.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var k=t.cloneCell(d);if(null!=f)f(k);else{k.geometry.x=t.snap(Math.round(b/t.view.scale)-t.view.translate.x-d.geometry.width/2);k.geometry.y=t.snap(Math.round(c/t.view.scale)-t.view.translate.y-d.geometry.height/2);t.model.beginUpdate();try{t.addCell(k)}finally{t.model.endUpdate()}t.setSelectionCell(k); +t.scrollCellToVisible(k);t.startEditingAtCell(k);null!=g.hoverIcons&&g.hoverIcons.update(t.view.getState(k))}null!=l&&l()})});for(n=0;n<(d?Math.min(q.length,4):q.length);n++)e(q[n]);q=k.offsetTop+k.clientHeight-(t.container.scrollTop+t.container.offsetHeight);0=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=k,this.cumulativeZoomFactor= Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=k,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==Q&&""!=C.getAttribute("filter")&& (Q=C.getAttribute("filter"),C.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),d=c||null==J?b.container.scrollLeft+b.container.clientWidth/2:J.x+b.container.scrollLeft-b.container.offsetLeft,k=c||null==J?b.container.scrollTop+b.container.clientHeight/2:J.y+b.container.scrollTop-b.container.offsetTop,C.style.transformOrigin=d+"px "+k+"px",C.style.transform="scale("+this.cumulativeZoomFactor+")",A.style.transformOrigin=d+"px "+k+"px",A.style.transform="scale("+ @@ -2190,10 +2190,10 @@ this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions. this.actions.get("selectAll").setEnabled(e);this.actions.get("selectNone").setEnabled(e);f=1==c.vertices.length&&b.isCellFoldable(c.vertices[0]);this.actions.get("expand").setEnabled(f);this.actions.get("collapse").setEnabled(f);this.menus.get("navigation").setEnabled(0e&&(c=b.substring(e,f+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(n){}return c}; EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")}; EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(f),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(f.getModel().endUpdate(),null!=e&&e())}}}; -EditorUi.prototype.showImageDialog=function(b,c,e,f){f=this.editor.graph.cellEditor;var n=f.saveSelection(),l=mxUtils.prompt(b,c);f.restoreSelection(n);if(null!=l&&0m||Math.abs(t.y- -c.getGraphY())>m){var l=this.selectionCellsHandler.getHandler(e.cell);null==l&&this.model.isEdge(e.cell)&&(l=this.createHandler(e));if(null!=l&&null!=l.bends&&0m||Math.abs(q.y- +c.getGraphY())>m){var l=this.selectionCellsHandler.getHandler(e.cell);null==l&&this.model.isEdge(e.cell)&&(l=this.createHandler(e));if(null!=l&&null!=l.bends&&0mxUtils.indexOf(c,b)});this.updateCellStyles(b,d)};Graph.prototype.updateCellStyles= function(b,d){this.model.beginUpdate();try{for(var c=0;cp?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(b).match(n)||[""]).pop().replace(l,""),o:(0p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(b).match(n)||[""]).pop().replace(l,""),o:(0n&&"%"==c.charAt(match.index-1))t=l.substring(1);else{var d=l.substring(1,l.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var k=b;null==t&&null!=k;)null!=k.value&&"object"==typeof k.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=k.getAttribute(d+"_"+Graph.diagramLanguage)), -null==t&&(t=k.hasAttribute(d)?null!=k.getAttribute(d)?k.getAttribute(d):"":null)),k=this.model.getParent(k);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}f.push(c.substring(n,match.index)+(null!=t?t:l));n=match.index+l.length}}f.push(c.substring(n))}return f.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0n&&"%"==c.charAt(match.index-1))q=l.substring(1);else{var d=l.substring(1,l.length-1);if("id"==d)q=b.id;else if(0>d.indexOf("{"))for(var k=b;null==q&&null!=k;)null!=k.value&&"object"==typeof k.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(q=k.getAttribute(d+"_"+Graph.diagramLanguage)), +null==q&&(q=k.hasAttribute(d)?null!=k.getAttribute(d)?k.getAttribute(d):"":null)),k=this.model.getParent(k);null==q&&(q=this.getGlobalVariable(d));null==q&&null!=e&&(q=e[d])}f.push(c.substring(n,match.index)+(null!=q?q:l));n=match.index+l.length}}f.push(c.substring(n))}return f.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0this.activationDelay)&&this.currentState!=b&&(f>this.updateDelay&&null!=b||null==this.bbox||null==c||null==e||!mxUtils.contains(this.bbox, c,e))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; -HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,c,e,f,n){b=this.cloneCell(b);for(var l=0;lk||Math.abs(t.y-q.y)>k)&&(Math.abs(t.x-l.x)>k||Math.abs(t.y-l.y)>k)&&(Math.abs(t.x-J.x)>k||Math.abs(t.y-J.y)>k)&&(Math.abs(t.x-E.x)>k||Math.abs(t.y-E.y)>k)){E=t.x-q.x;J=t.y-q.y;t={distSq:E*E+J*J,x:t.x,y:t.y};for(E=0;Et.distSq){n.splice(E,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(A=0;Ae*e&&0e*e&&(E=new mxPoint(C.x-n.x,C.y-n.y),A=new mxPoint(C.x+n.x,C.y+n.y),p.push(E),this.addPoints(b,p,c,g,!1,null,f),p=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,f=!1,"sharp"==k?(b.lineTo(E.x-n.y*p,E.y+n.x*p),b.lineTo(A.x-n.y*p,A.y+n.x*p),b.lineTo(A.x,A.y)):"line"==k?(b.moveTo(E.x+n.y*p,E.y-n.x*p),b.lineTo(E.x-n.y*p,E.y+n.x*p),b.moveTo(A.x-n.y*p,A.y+n.x*p),b.lineTo(A.x+n.y* -p,A.y-n.x*p),b.moveTo(A.x,A.y)):"arc"==k?(p*=1.3,b.curveTo(E.x-n.y*p,E.y+n.x*p,A.x-n.y*p,A.y+n.x*p,A.x,A.y)):(b.moveTo(A.x,A.y),f=!0),p=[A],E=!0))}else n=null;E||(p.push(C),m=C)}this.addPoints(b,p,c,g,!1,null,f);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,c,g){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(b,c,g,e){if(null==c||null==b||"1"!=c.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{c=this.getTerminalPort(b,c,e);var k=this.getNextPoint(b,g,e),f=this.graph.isOrthogonal(b),m=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=m)var q=Math.cos(-m),p=Math.sin(-m),k=mxUtils.getRotatedPoint(k,q,p,l);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(c,k,0==m&&f,q);0!=m&&(q=Math.cos(m),p=Math.sin(m),k=mxUtils.getRotatedPoint(k,q,p,l));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,c,g,e,k),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,c,g,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);g=c=null;if(null!=b)for(var k=0;kk||Math.abs(q.y-t.y)>k)&&(Math.abs(q.x-l.x)>k||Math.abs(q.y-l.y)>k)&&(Math.abs(q.x-J.x)>k||Math.abs(q.y-J.y)>k)&&(Math.abs(q.x-E.x)>k||Math.abs(q.y-E.y)>k)){E=q.x-t.x;J=q.y-t.y;q={distSq:E*E+J*J,x:q.x,y:q.y};for(E=0;Eq.distSq){n.splice(E,0,q);q=null;break}null==q||0!=n.length&&n[n.length-1].x===q.x&&n[n.length-1].y===q.y||n.push(q)}}}for(A=0;Ae*e&&0e*e&&(E=new mxPoint(C.x-n.x,C.y-n.y),A=new mxPoint(C.x+n.x,C.y+n.y),p.push(E),this.addPoints(b,p,c,g,!1,null,f),p=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,f=!1,"sharp"==k?(b.lineTo(E.x-n.y*p,E.y+n.x*p),b.lineTo(A.x-n.y*p,A.y+n.x*p),b.lineTo(A.x,A.y)):"line"==k?(b.moveTo(E.x+n.y*p,E.y-n.x*p),b.lineTo(E.x-n.y*p,E.y+n.x*p),b.moveTo(A.x-n.y*p,A.y+n.x*p),b.lineTo(A.x+n.y* +p,A.y-n.x*p),b.moveTo(A.x,A.y)):"arc"==k?(p*=1.3,b.curveTo(E.x-n.y*p,E.y+n.x*p,A.x-n.y*p,A.y+n.x*p,A.x,A.y)):(b.moveTo(A.x,A.y),f=!0),p=[A],E=!0))}else n=null;E||(p.push(C),m=C)}this.addPoints(b,p,c,g,!1,null,f);b.stroke()}};var q=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,c,g){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):q.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(b,c,g,e){if(null==c||null==b||"1"!=c.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{c=this.getTerminalPort(b,c,e);var k=this.getNextPoint(b,g,e),f=this.graph.isOrthogonal(b),m=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=m)var t=Math.cos(-m),p=Math.sin(-m),k=mxUtils.getRotatedPoint(k,t,p,l);t=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);t+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(c,k,0==m&&f,t);0!=m&&(t=Math.cos(m),p=Math.sin(m),k=mxUtils.getRotatedPoint(k,t,p,l));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,c,g,e,k),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,c,g,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);g=c=null;if(null!=b)for(var k=0;k=l.getStatus()&&eval.call(window,l.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,n,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c}; +null);else if(".js"==n.toLowerCase().substring(n.length-3,n.length))try{if(mxStencilRegistry.allowEval){var l=mxUtils.load(n);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",b,e,c,n,q)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c}; mxStencilRegistry.getBasenameForStencil=function(b){var c=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c=p.x&&this.model.remove(B[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW, +m.slice();this.model.beginUpdate();try{if(1!=m.length||this.isCellLocked(this.getDefaultParent()))for(k=0;k=p.x&&this.model.remove(B[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW, mxConstants.NONE,[b]);var n=this.model.getTerminal(c,!1);if(null!=n){var u=this.getCurrentCellStyle(n);null!=u&&"1"==u.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,c){if(d||c)g.apply(this,arguments); -else{var e=this.getSelectionCell(),k=null,f=[],l=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(f.push(d),d==e)k=f.length-1;else if(b&&null==e&&0k||!b&&0y)for(x=0;x>y;x--)this.model.remove(v[v.length+ -x-1]);v=this.model.getChildCells(b[m],!0);for(x=0;xmxUtils.indexOf(b,k)&&0>mxUtils.indexOf(c,k)&&c.push(k):this.labelChanged(b[g],"")}else{if(this.isTableRow(b[g])&&(k=this.model.getParent(b[g]),0>mxUtils.indexOf(b,k)&&0>mxUtils.indexOf(c,k))){for(var f=this.model.getChildCells(k,!0),l=0,q=0;q< -f.length;q++)0<=mxUtils.indexOf(b,f[q])&&l++;l==f.length&&c.push(k)}c.push(b[g])}c=m.apply(this,[c,d])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(b,d,c){c=null!=c?c:new Graph;for(var g=0;gk||!b&&0y)for(x=0;x>y;x--)this.model.remove(v[v.length+ +x-1]);v=this.model.getChildCells(b[l],!0);for(x=0;xmxUtils.indexOf(b,k)&&0>mxUtils.indexOf(c,k)&&c.push(k):this.labelChanged(b[g],"")}else{if(this.isTableRow(b[g])&&(k=this.model.getParent(b[g]),0>mxUtils.indexOf(b,k)&&0>mxUtils.indexOf(c,k))){for(var f=this.model.getChildCells(k,!0),l=0,t=0;t< +f.length;t++)0<=mxUtils.indexOf(b,f[t])&&l++;l==f.length&&c.push(k)}c.push(b[g])}c=m.apply(this,[c,d])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(b,d,c){c=null!=c?c:new Graph;for(var g=0;gk||g>k)&&this.clear()}}else{for(c=d.getSource();null!=c&&"a"!= e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-f.container.scrollLeft)Ua&&z++;va++}v.length=k.length)d.remove(c);else{var f=k.length-1;this.isTableCell(b)&&(f=mxUtils.indexOf(k,b));for(g=b=0;g=e.length)d.remove(c);else{this.isTableRow(g)||(g=e[e.length-1]);d.remove(g);b=0;var k=this.getCellGeometry(g);null!=k&&(b=k.height);var f=this.getCellGeometry(c); +(b=Math.max(b,m.width))}var t=this.getCellGeometry(c);null!=t&&(t=t.clone(),t.width-=b,d.setGeometry(c,t))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var c=b,g=b;this.isTableCell(b)&&(b=g=d.getParent(b));this.isTableRow(b)&&(c=d.getParent(g));var e=d.getChildCells(c,!0);if(1>=e.length)d.remove(c);else{this.isTableRow(g)||(g=e[e.length-1]);d.remove(g);b=0;var k=this.getCellGeometry(g);null!=k&&(b=k.height);var f=this.getCellGeometry(c); null!=f&&(f=f.clone(),f.height-=b,d.setGeometry(c,f))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var c=b.tBodies[0],g=c.rows[0].cells,e=0,k=0;kd&&c[g].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents(); var c=document.createElement("div");c.innerHTML=b;b=document.createDocumentFragment();for(var g;g=c.firstChild;)lastNode=b.appendChild(g);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function c(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(b)?this.getLinkTitle(b):b;var g= @@ -2588,11 +2589,11 @@ d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationH function(b,d){return mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var J=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return J.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))): this.bounds};var N=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return N.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var M=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||M.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset= function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var b=X.apply(this,arguments); -if(this.graph.isTable(this.state.cell)){var d=function(b,d,c){for(var g=[],e=0;ef||Math.abs(k)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(g,c),this.isSpaceEvent(d)?(g=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()|| (this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px", null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&& @@ -2627,9 +2628,9 @@ null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode W=0):W=(new Date).getTime()-K;this.currentTerminalState=c};var I=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return mxEvent.isShiftDown(b.getEvent())&&mxEvent.isAltDown(b.getEvent())?!1:null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,g,d):null;c=null!=(null!=b?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),b):null)?c?this.endFixedHandleImage:this.fixedHandleImage:null!=b&&null!=g?c?this.endTerminalHandleImage:this.terminalHandleImage:c?this.endHandleImage:this.handleImage;if(null!=c)return c= new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var la=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,d,c){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage; -return la.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),c=d.getParent(b[0]),g=this.graph.getCellGeometry(b[0]);if(d.isEdge(c)&&null!=g&&g.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return oa.apply(this,arguments)};var pa=mxGraphHandler.prototype.getGuideStates; -mxGraphHandler.prototype.getGuideStates=function(){for(var b=pa.apply(this,arguments),d=[],c=0;cb.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox|| -b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):ka.apply(this,arguments)};var qa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var c=this.graph.getModel(),g=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!c.isEdge(g)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&qa.apply(this,arguments)}; +return la.apply(this,arguments)};var pa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),c=d.getParent(b[0]),g=this.graph.getCellGeometry(b[0]);if(d.isEdge(c)&&null!=g&&g.relative&&(d=this.graph.view.getState(b[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return pa.apply(this,arguments)};var qa=mxGraphHandler.prototype.getGuideStates; +mxGraphHandler.prototype.getGuideStates=function(){for(var b=qa.apply(this,arguments),d=[],c=0;cb.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox|| +b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):ka.apply(this,arguments)};var oa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var c=this.graph.getModel(),g=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!c.isEdge(g)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&oa.apply(this,arguments)}; mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; var Z=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){Z.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var P=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){P.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&& (this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var sa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){sa.apply(this,arguments);var b=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1== @@ -2648,14 +2649,14 @@ d=this.cornerHandles,c=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].boun function(){ra.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;bk?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(g-z,0),b.lineTo(g,z),b.lineTo(z,z),b.close(),b.fill()),0!=f&&(b.setFillAlpha(Math.abs(f)),b.setFillColor(0>f?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z, z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(g,z),b.end(),b.stroke())};f.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",f);var Sa=Math.tan(mxUtils.toRadians(30)),Ka=(.5-Sa)/2;mxCellRenderer.registerShape("isoRectangle",l);mxUtils.extend(n, mxCylinder);n.prototype.size=6;n.prototype.paintVertexShape=function(b,d,c,g,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(g-z),c+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,c,g,e);b.fill()};mxCellRenderer.registerShape("waypoint",n);mxUtils.extend(l,mxActor);l.prototype.size=20;l.prototype.redrawPath=function(b,d,c,g,e){d=Math.min(g,e/Sa);b.translate((g-d)/2,(e-d)/2+d/4);b.moveTo(0, -.25*d);b.lineTo(.5*d,d*Ka);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ka)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",l);mxUtils.extend(t,mxCylinder);t.prototype.size=20;t.prototype.redrawPath=function(b,d,c,g,e,k){d=Math.min(g,e/(.5+Sa));k?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ka)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ka)*d),b.lineTo(.5*d,(1-Ka)*d)):(b.translate((g-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ka),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5* -d,(1-Ka)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",t);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(b,d,c,g,e,k){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(k&&null!=this.fill||!k&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,g,2*d,g,d),k||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,g,2*d,g,d),k||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,g,2*d,g,d),k||(b.stroke(),b.begin()),b.translate(0, +.25*d);b.lineTo(.5*d,d*Ka);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ka)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",l);mxUtils.extend(q,mxCylinder);q.prototype.size=20;q.prototype.redrawPath=function(b,d,c,g,e,k){d=Math.min(g,e/(.5+Sa));k?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ka)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ka)*d),b.lineTo(.5*d,(1-Ka)*d)):(b.translate((g-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ka),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5* +d,(1-Ka)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",q);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(b,d,c,g,e,k){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(k&&null!=this.fill||!k&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,g,2*d,g,d),k||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,g,2*d,g,d),k||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,g,2*d,g,d),k||(b.stroke(),b.begin()),b.translate(0, -d);k||(b.moveTo(0,d),b.curveTo(0,-d/3,g,-d/3,g,d),b.lineTo(g,e-d),b.curveTo(g,e+d/3,0,e+d/3,0,e-d),b.close())};d.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(b,d,c,g,e){var z=Math.max(0,Math.min(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size", this.size))))),k=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,c);b.begin();b.moveTo(0,0);b.lineTo(g-z,0);b.lineTo(g,z);b.lineTo(g,e);b.lineTo(0,e);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=k&&(b.setFillAlpha(Math.abs(k)),b.setFillColor(0>k?"#FFFFFF":"#000000"),b.begin(),b.moveTo(g-z,0),b.lineTo(g-z,z),b.lineTo(g,z),b.close(),b.fill()),b.begin(),b.moveTo(g-z,0),b.lineTo(g-z,z),b.lineTo(g,z), -b.end(),b.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(g,k);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(q,mxShape);q.prototype.isoAngle=15;q.prototype.paintVertexShape=function(b,d,c,g,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, -"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(g*Math.tan(z),.5*e);b.translate(d,c);b.begin();b.moveTo(.5*g,0);b.lineTo(g,z);b.lineTo(g,e-z);b.lineTo(.5*g,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*g,2*z);b.lineTo(g,z);b.moveTo(.5*g,2*z);b.lineTo(.5*g,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",q);mxUtils.extend(m,mxShape);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,c,g,e){var z=Math.max(0,Math.min(.5* +b.end(),b.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(g,k);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(t,mxShape);t.prototype.isoAngle=15;t.prototype.paintVertexShape=function(b,d,c,g,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style, +"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(g*Math.tan(z),.5*e);b.translate(d,c);b.begin();b.moveTo(.5*g,0);b.lineTo(g,z);b.lineTo(g,e-z);b.lineTo(.5*g,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);b.begin();b.moveTo(0,z);b.lineTo(.5*g,2*z);b.lineTo(g,z);b.moveTo(.5*g,2*z);b.lineTo(.5*g,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",t);mxUtils.extend(m,mxShape);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,c,g,e){var z=Math.max(0,Math.min(.5* e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,c);0==z?(b.rect(0,0,g,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*g,z,0,0,1,.5*g,0),b.arcTo(.5*g,z,0,0,1,g,z),b.lineTo(g,e-z),b.arcTo(.5*g,z,0,0,1,.5*g,e),b.arcTo(.5*g,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(g,z),b.arcTo(.5*g,z,0,0,1,.5*g,2*z),b.arcTo(.5*g,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",m);mxUtils.extend(p,mxCylinder);p.prototype.size= 15;p.prototype.paintVertexShape=function(b,d,c,g,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),k=mxUtils.getValue(this.style,"lid",!0);b.translate(d,c);0==z?(b.rect(0,0,g,e),b.fillAndStroke()):(b.begin(),k?(b.moveTo(0,z),b.arcTo(.5*g,z,0,0,1,.5*g,0),b.arcTo(.5*g,z,0,0,1,g,z)):(b.moveTo(0,0),b.arcTo(.5*g,z,0,0,0,.5*g,z),b.arcTo(.5*g,z,0,0,0,g,0)),b.lineTo(g,e-z),b.arcTo(.5*g,z,0,0,1,.5*g,e),b.arcTo(.5*g,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1), k&&(b.begin(),b.moveTo(g,z),b.arcTo(.5*g,z,0,0,1,.5*g,2*z),b.arcTo(.5*g,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",p);mxUtils.extend(v,mxActor);v.prototype.redrawPath=function(b,d,c,g,e){b.moveTo(0,0);b.quadTo(g/2,.5*e,g,0);b.quadTo(.5*g,e/2,g,e);b.quadTo(g/2,.5*e,0,e);b.quadTo(.5*g,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",v);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1; -u.prototype.paintVertexShape=function(b,d,c,g,e){b.translate(d,c);d=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var k=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),z=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1),l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f||(l*=Math.min(g,e)); -l=Math.min(l,.5*g,.5*(e-c));d=Math.max(d,l);d=Math.min(g-l,d);z||(l=0);b.begin();"left"==k?(b.moveTo(Math.max(l,0),c),b.lineTo(Math.max(l,0),0),b.lineTo(d,0),b.lineTo(d,c)):(b.moveTo(g-d,c),b.lineTo(g-d,0),b.lineTo(g-Math.max(l,0),0),b.lineTo(g-Math.max(l,0),c));z?(b.moveTo(0,l+c),b.arcTo(l,l,0,0,1,l,c),b.lineTo(g-l,c),b.arcTo(l,l,0,0,1,g,l+c),b.lineTo(g,e-l),b.arcTo(l,l,0,0,1,g-l,e),b.lineTo(l,e),b.arcTo(l,l,0,0,1,0,e-l)):(b.moveTo(0,c),b.lineTo(g,c),b.lineTo(g,e),b.lineTo(0,e));b.close();b.fillAndStroke(); +u.prototype.paintVertexShape=function(b,d,c,g,e){b.translate(d,c);d=Math.max(0,Math.min(g,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),k=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1),l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f||(l*=Math.min(g,e)); +l=Math.min(l,.5*g,.5*(e-c));d=Math.max(d,l);d=Math.min(g-l,d);k||(l=0);b.begin();"left"==z?(b.moveTo(Math.max(l,0),c),b.lineTo(Math.max(l,0),0),b.lineTo(d,0),b.lineTo(d,c)):(b.moveTo(g-d,c),b.lineTo(g-d,0),b.lineTo(g-Math.max(l,0),0),b.lineTo(g-Math.max(l,0),c));k?(b.moveTo(0,l+c),b.arcTo(l,l,0,0,1,l,c),b.lineTo(g-l,c),b.arcTo(l,l,0,0,1,g,l+c),b.lineTo(g,e-l),b.arcTo(l,l,0,0,1,g-l,e),b.lineTo(l,e),b.arcTo(l,l,0,0,1,0,e-l)):(b.moveTo(0,c),b.lineTo(g,c),b.lineTo(g,e),b.lineTo(0,e));b.close();b.fillAndStroke(); b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(g-30,c+20),b.lineTo(g-20,c+10),b.lineTo(g-10,c+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",u);u.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style, "tabHeight",15)*this.scale,g=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(k*=Math.min(b.width,b.height));k=Math.min(k,.5*b.width,.5*(b.height-d));g||(k=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(k,0,Math.min(b.width,b.width-c),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-c),0,k,Math.min(b.height,b.height- d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(x,mxCylinder);x.prototype.arcSize=.1;x.prototype.paintVertexShape=function(b,d,c,g,e){b.translate(d,c);var k=mxUtils.getValue(this.style,"rounded",!1),z=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));c=mxUtils.getValue(this.style,"umlStateConnection",null);z||(d*=Math.min(g,e));d=Math.min(d,.5*g,.5*e);k||(d=0);k=0;null!=c&&(k=10);b.begin();b.moveTo(k, @@ -2709,8 +2710,8 @@ mxUtils.extend(Q,mxHexagon);Q.prototype.size=.25;Q.prototype.fixedSize=20;Q.prot 0),new mxPoint(g-d,0),new mxPoint(g,.5*e),new mxPoint(g-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",Q);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(b,d,c,g,e){var k=Math.min(g/5,e/5)+1;b.begin();b.moveTo(d+g/2,c+k);b.lineTo(d+g/2,c+e-k);b.moveTo(d+k,c+e/2);b.lineTo(d+g-k,c+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus", V);var $a=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=function(b,d,c,g,e){$a.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var k=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| 0);d+=k;c+=k;g-=2*k;e-=2*k;0f+l?b.y=c.y:b.x=c.x);return mxUtils.getPerimeterPoint(z,b,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,c,g){var e="0"!=mxUtils.getValue(d.style, "fixedSize","0"),k=e?F.prototype.fixedSize:F.prototype.size;null!=d&&(k=mxUtils.getValue(d.style,"size",k));e&&(k*=d.view.scale);var f=b.x,z=b.y,l=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*l,k)):l*Math.max(0,Math.min(1,k)),z=[new mxPoint(f+e,z),new mxPoint(f+l-e,z),new mxPoint(f+l,z+m),new mxPoint(f,z+m),new mxPoint(f+e,z)]):d==mxConstants.DIRECTION_WEST? (e=e?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z),new mxPoint(f+l,z),new mxPoint(f+l-e,z+m),new mxPoint(f+e,z+m),new mxPoint(f,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z+e),new mxPoint(f+l,z),new mxPoint(f+l,z+m),new mxPoint(f,z+m-e),new mxPoint(f,z+e)]):(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z),new mxPoint(f+l,z+e),new mxPoint(f+l,z+m-e),new mxPoint(f,z+m),new mxPoint(f, -z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);g&&(c.xf+l?b.y=c.y:b.x=c.x);return mxUtils.getPerimeterPoint(z,b,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,c,g){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),k=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(k=mxUtils.getValue(d.style,"size",k));e&&(k*=d.view.scale);var f=b.x,z=b.y,l=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!= +z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);g&&(c.xf+l?b.y=c.y:b.x=c.x);return mxUtils.getPerimeterPoint(z,b,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,c,g){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),k=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(k=mxUtils.getValue(d.style,"size",k));e&&(k*=d.view.scale);var f=b.x,z=b.y,l=b.width,m=b.height,t=b.getCenterX();b=b.getCenterY();d=null!= d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z),new mxPoint(f+l-e,z),new mxPoint(f+l,b),new mxPoint(f+l-e,z+m),new mxPoint(f,z+m),new mxPoint(f+e,b),new mxPoint(f,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),z=[new mxPoint(f+e,z),new mxPoint(f+l,z),new mxPoint(f+l-e,b),new mxPoint(f+ -l,z+m),new mxPoint(f+e,z+m),new mxPoint(f,b),new mxPoint(f+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z+e),new mxPoint(q,z),new mxPoint(f+l,z+e),new mxPoint(f+l,z+m),new mxPoint(q,z+m-e),new mxPoint(f,z+m),new mxPoint(f,z+e)]):(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z),new mxPoint(q,z+e),new mxPoint(f+l,z),new mxPoint(f+l,z+m-e),new mxPoint(q,z+m),new mxPoint(f,z+m-e),new mxPoint(f,z)]);q=new mxPoint(q, -b);g&&(c.xf+l?q.y=c.y:q.x=c.x);return mxUtils.getPerimeterPoint(z,q,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,c,g){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),k=e?Q.prototype.fixedSize:Q.prototype.size;null!=d&&(k=mxUtils.getValue(d.style,"size",k));e&&(k*=d.view.scale);var f=b.x,z=b.y,l=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): -mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(q,z),new mxPoint(f+l,z+e),new mxPoint(f+l,z+m-e),new mxPoint(q,z+m),new mxPoint(f,z+m-e),new mxPoint(f,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),z=[new mxPoint(f+e,z),new mxPoint(f+l-e,z),new mxPoint(f+l,b),new mxPoint(f+l-e,z+m),new mxPoint(f+e,z+m),new mxPoint(f,b),new mxPoint(f+e,z)]);q=new mxPoint(q, -b);g&&(c.xf+l?q.y=c.y:q.x=c.x);return mxUtils.getPerimeterPoint(z,q,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.paintBackground=function(b,d,c,g,e){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,c);b.ellipse((g-k)/2,0,k,k);b.fillAndStroke();b.begin();b.moveTo(g/2,k);b.lineTo(g/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",fa);mxUtils.extend(I,mxShape); +l,z+m),new mxPoint(f+e,z+m),new mxPoint(f,b),new mxPoint(f+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z+e),new mxPoint(t,z),new mxPoint(f+l,z+e),new mxPoint(f+l,z+m),new mxPoint(t,z+m-e),new mxPoint(f,z+m),new mxPoint(f,z+e)]):(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(f,z),new mxPoint(t,z+e),new mxPoint(f+l,z),new mxPoint(f+l,z+m-e),new mxPoint(t,z+m),new mxPoint(f,z+m-e),new mxPoint(f,z)]);t=new mxPoint(t, +b);g&&(c.xf+l?t.y=c.y:t.x=c.x);return mxUtils.getPerimeterPoint(z,t,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,c,g){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),k=e?Q.prototype.fixedSize:Q.prototype.size;null!=d&&(k=mxUtils.getValue(d.style,"size",k));e&&(k*=d.view.scale);var f=b.x,z=b.y,l=b.width,m=b.height,t=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST): +mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,k)):m*Math.max(0,Math.min(1,k)),z=[new mxPoint(t,z),new mxPoint(f+l,z+e),new mxPoint(f+l,z+m-e),new mxPoint(t,z+m),new mxPoint(f,z+m-e),new mxPoint(f,z+e),new mxPoint(t,z)]):(e=e?Math.max(0,Math.min(l,k)):l*Math.max(0,Math.min(1,k)),z=[new mxPoint(f+e,z),new mxPoint(f+l-e,z),new mxPoint(f+l,b),new mxPoint(f+l-e,z+m),new mxPoint(f+e,z+m),new mxPoint(f,b),new mxPoint(f+e,z)]);t=new mxPoint(t, +b);g&&(c.xf+l?t.y=c.y:t.x=c.x);return mxUtils.getPerimeterPoint(z,t,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.paintBackground=function(b,d,c,g,e){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,c);b.ellipse((g-k)/2,0,k,k);b.fillAndStroke();b.begin();b.moveTo(g/2,k);b.lineTo(g/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",fa);mxUtils.extend(I,mxShape); I.prototype.size=10;I.prototype.inset=2;I.prototype.paintBackground=function(b,d,c,g,e){var k=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,c);b.begin();b.moveTo(g/2,k+f);b.lineTo(g/2,e);b.end();b.stroke();b.begin();b.moveTo((g-k)/2-f,k/2);b.quadTo((g-k)/2-f,k+f,g/2,k+f);b.quadTo((g+k)/2+f,k+f,(g+k)/2+f,k/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",I);mxUtils.extend(la,mxShape); -la.prototype.paintBackground=function(b,d,c,g,e){b.translate(d,c);b.begin();b.moveTo(0,0);b.quadTo(g,0,g,e/2);b.quadTo(g,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",la);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(b,d,c,g,e){var k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,c);b.ellipse(0,k,g-2*k,e-2*k);b.fillAndStroke();b.begin();b.moveTo(g/2,0);b.quadTo(g,0,g,e/2);b.quadTo(g,e, -g/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=20;pa.prototype.jettyHeight=10;pa.prototype.redrawPath=function(b,d,c,g,e,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,z=Math.min(d,e-d),l=Math.min(z+2*d,e-d);k?(b.moveTo(c,z),b.lineTo(f,z),b.lineTo(f,z+d),b.lineTo(c,z+d),b.moveTo(c, -l),b.lineTo(f,l),b.lineTo(f,l+d),b.lineTo(c,l+d)):(b.moveTo(c,0),b.lineTo(g,0),b.lineTo(g,e),b.lineTo(c,e),b.lineTo(c,l+d),b.lineTo(0,l+d),b.lineTo(0,l),b.lineTo(c,l),b.lineTo(c,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(c,z),b.close());b.end()};mxCellRenderer.registerShape("module",pa);mxUtils.extend(ka,mxCylinder);ka.prototype.jettyWidth=32;ka.prototype.jettyHeight=12;ka.prototype.redrawPath=function(b,d,c,g,e,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style, -"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,z=.3*e-d/2,l=.7*e-d/2;k?(b.moveTo(c,z),b.lineTo(f,z),b.lineTo(f,z+d),b.lineTo(c,z+d),b.moveTo(c,l),b.lineTo(f,l),b.lineTo(f,l+d),b.lineTo(c,l+d)):(b.moveTo(c,0),b.lineTo(g,0),b.lineTo(g,e),b.lineTo(c,e),b.lineTo(c,l+d),b.lineTo(0,l+d),b.lineTo(0,l),b.lineTo(c,l),b.lineTo(c,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(c,z),b.close());b.end()};mxCellRenderer.registerShape("component",ka);mxUtils.extend(qa,mxRectangleShape);qa.prototype.paintForeground= -function(b,d,c,g,e){var k=g/2,f=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+k,c),new mxPoint(d+g,c+f),new mxPoint(d+k,c+e),new mxPoint(d,c+f)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",qa);mxUtils.extend(Z,mxDoubleEllipse);Z.prototype.outerStroke=!0;Z.prototype.paintVertexShape=function(b,d,c,g,e){var k=Math.min(4, +la.prototype.paintBackground=function(b,d,c,g,e){b.translate(d,c);b.begin();b.moveTo(0,0);b.quadTo(g,0,g,e/2);b.quadTo(g,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",la);mxUtils.extend(pa,mxShape);pa.prototype.inset=2;pa.prototype.paintBackground=function(b,d,c,g,e){var k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,c);b.ellipse(0,k,g-2*k,e-2*k);b.fillAndStroke();b.begin();b.moveTo(g/2,0);b.quadTo(g,0,g,e/2);b.quadTo(g,e, +g/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",pa);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=20;qa.prototype.jettyHeight=10;qa.prototype.redrawPath=function(b,d,c,g,e,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,z=Math.min(d,e-d),l=Math.min(z+2*d,e-d);k?(b.moveTo(c,z),b.lineTo(f,z),b.lineTo(f,z+d),b.lineTo(c,z+d),b.moveTo(c, +l),b.lineTo(f,l),b.lineTo(f,l+d),b.lineTo(c,l+d)):(b.moveTo(c,0),b.lineTo(g,0),b.lineTo(g,e),b.lineTo(c,e),b.lineTo(c,l+d),b.lineTo(0,l+d),b.lineTo(0,l),b.lineTo(c,l),b.lineTo(c,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(c,z),b.close());b.end()};mxCellRenderer.registerShape("module",qa);mxUtils.extend(ka,mxCylinder);ka.prototype.jettyWidth=32;ka.prototype.jettyHeight=12;ka.prototype.redrawPath=function(b,d,c,g,e,k){var f=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style, +"jettyHeight",this.jettyHeight));c=f/2;var f=c+f/2,z=.3*e-d/2,l=.7*e-d/2;k?(b.moveTo(c,z),b.lineTo(f,z),b.lineTo(f,z+d),b.lineTo(c,z+d),b.moveTo(c,l),b.lineTo(f,l),b.lineTo(f,l+d),b.lineTo(c,l+d)):(b.moveTo(c,0),b.lineTo(g,0),b.lineTo(g,e),b.lineTo(c,e),b.lineTo(c,l+d),b.lineTo(0,l+d),b.lineTo(0,l),b.lineTo(c,l),b.lineTo(c,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(c,z),b.close());b.end()};mxCellRenderer.registerShape("component",ka);mxUtils.extend(oa,mxRectangleShape);oa.prototype.paintForeground= +function(b,d,c,g,e){var k=g/2,f=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+k,c),new mxPoint(d+g,c+f),new mxPoint(d+k,c+e),new mxPoint(d,c+f)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",oa);mxUtils.extend(Z,mxDoubleEllipse);Z.prototype.outerStroke=!0;Z.prototype.paintVertexShape=function(b,d,c,g,e){var k=Math.min(4, Math.min(g/5,e/5));0=2*g&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25, @@ -2881,7 +2882,7 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnect 0,.25*(c-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};ma.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints= mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(b,d,c){b=[];var g=Math.min(d,c/2),e=Math.min(d-g,Math.max(0,parseFloat(mxUtils.getValue(this.style, "size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-g),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-g,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-g,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-g),c));b.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,e,c));return b};pa.prototype.getConstraints=function(b,d,c){d=parseFloat(mxUtils.getValue(b,"jettyWidth",pa.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",pa.prototype.jettyHeight));var g=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, +0),!1,null,e,c));return b};qa.prototype.getConstraints=function(b,d,c){d=parseFloat(mxUtils.getValue(b,"jettyWidth",qa.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",qa.prototype.jettyHeight));var g=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c- .5*b,3.5*b))];c>5*b&&g.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));c>8*b&&g.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));c>15*b&&g.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return g};ta.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];Y.prototype.constraints= @@ -2909,14 +2910,14 @@ parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))), 0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,k));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,k));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),k));b.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,f,k));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,k));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,k));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));return b};K.prototype.constraints=null;xa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, -.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()} +.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()} Actions.prototype.init=function(){function b(b){l.escape();b=l.deleteCells(l.getDeletableCells(l.getSelectionCells()),b);null!=b&&l.setSelectionCells(b)}function c(){if(!l.isSelectionEmpty()){l.getModel().beginUpdate();try{for(var b=l.getSelectionCells(),d=0;dMath.abs(b-l.view.scale)&&d==l.view.translate.x&&c==l.view.translate.y&&f.actions.get(l.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){l.isEnabled()&&(l.isSelectionEmpty()?f.actions.get("smartFit").funct():l.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()})); -window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var c=mxUtils.parseXml(b);n.graph.setSelectionCells(n.graph.importGraphModel(c.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=t;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=t;this.addAction("saveAs...",function(){f.saveFile(!0)},null, -null,Editor.ctrlKey+"+Shift+S").isEnabled=t;this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(f);f.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container,320,240,!0,!0)}).isEnabled=t;this.addAction("print...",function(){f.showDialog((new PrintDialog(f)).container,300,180,!0,!0)},null,"sprite-print", -Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(l,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=f.copyXml(),null!=b&&l.removeCells(b,!1)}catch(q){}null==b&&mxClipboard.cut(l)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(g){}try{mxClipboard.copy(l)}catch(g){f.handleError(g)}}, -null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(b){if(null!=b){l.getModel().beginUpdate();try{f.pasteXml(b,!0)}finally{l.getModel().endUpdate()}}else mxClipboard.paste(l)}),b=!0)}catch(q){}b||mxClipboard.paste(l)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,c=0;c< +window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var c=mxUtils.parseXml(b);n.graph.setSelectionCells(n.graph.importGraphModel(c.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=q;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=q;this.addAction("saveAs...",function(){f.saveFile(!0)},null, +null,Editor.ctrlKey+"+Shift+S").isEnabled=q;this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(f);f.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container,320,240,!0,!0)}).isEnabled=q;this.addAction("print...",function(){f.showDialog((new PrintDialog(f)).container,300,180,!0,!0)},null,"sprite-print", +Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(l,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=f.copyXml(),null!=b&&l.removeCells(b,!1)}catch(t){}null==b&&mxClipboard.cut(l)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(g){}try{mxClipboard.copy(l)}catch(g){f.handleError(g)}}, +null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(b){if(null!=b){l.getModel().beginUpdate();try{f.pasteXml(b,!0)}finally{l.getModel().endUpdate()}}else mxClipboard.paste(l)}),b=!0)}catch(t){}b||mxClipboard.paste(l)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,c=0;c< b.length&&d;c++)d=d&&l.model.isEdge(b[c]);var g=l.view.translate,c=l.view.scale,e=g.x,k=g.y,g=null;if(1==b.length&&d){var f=l.getCellGeometry(b[0]);null!=f&&(g=f.getTerminalPoint(!0))}g=null!=g?g:l.getBoundingBoxFromGeometry(b,d);null!=g&&(d=Math.round(l.snap(l.popupMenuHandler.triggerX/c-e)),c=Math.round(l.snap(l.popupMenuHandler.triggerY/c-k)),l.cellsMoved(b,d-g.x,c-g.y))}}function c(){l.getModel().beginUpdate();try{d(mxClipboard.paste(l))}finally{l.getModel().endUpdate()}}if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){b= !1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(b){if(null!=b){l.getModel().beginUpdate();try{d(f.pasteXml(b,!0))}finally{l.getModel().endUpdate()}}else c()}),b=!0)}catch(p){}b||c()}});this.addAction("copySize",function(){var b=l.getSelectionCell();l.isEnabled()&&null!=b&&l.getModel().isVertex(b)&&(b=l.getCellGeometry(b),null!=b&&(f.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(l.isEnabled()&&!l.isSelectionEmpty()&& null!=f.copiedSize){l.getModel().beginUpdate();try{for(var b=l.getResizableCells(l.getSelectionCells()),d=0;d/g,"\n"));var n=document.createElement("div");n.innerHTML=l.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(n.childNodes);l.cellLabelChanged(state.cell,k);l.setCellStyles("html",b,[d[c]])}else"0"==e&&"1"==b&&(k=mxUtils.htmlEntities(l.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"
")),l.cellLabelChanged(state.cell,l.sanitizeHtml(k)),l.setCellStyles("html",b,[d[c]]))}f.fireEvent(new mxEventObject("styleChanged", "keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{l.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=l.getView().getState(l.getSelectionCell()),d="wrap";l.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);l.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",function(){var b="0",d=l.getView().getState(l.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(f,b,mxResources.get("apply"), @@ -2947,10 +2948,10 @@ l.container.clientHeight)/2),l.container.scrollLeft=Math.min(b.x,(l.container.sc 2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*l.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b}; DrawioFile.prototype.checksumError=function(b,c,e,f,n){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;bmxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(f.history=n,f.indexOfNextAdd=l,f.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=t.mathEnabled? -(this.ui.editor.updateGraphComponents(),t.refresh()):(k!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",c,"undoable",e)}return b}; +DrawioFile.prototype.patch=function(b,c,e){if(null!=b){var f=this.ui.editor.undoManager,n=f.history.slice(),l=f.indexOfNextAdd,q=this.ui.editor.graph;q.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var k=q.foldingEnabled,g=q.mathEnabled,t=q.cellRenderer.redraw;q.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());t.apply(this,arguments)};q.model.beginUpdate(); +try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,c,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{q.container.style.visibility="";q.model.endUpdate();q.cellRenderer.redraw=t;this.changeListenerEnabled=d;e||(f.history=n,f.indexOfNextAdd=l,f.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=q.mathEnabled? +(this.ui.editor.updateGraphComponents(),q.refresh()):(k!=q.foldingEnabled?q.view.revalidate():q.view.validate(),q.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",c,"undoable",e)}return b}; DrawioFile.prototype.save=function(b,c,e,f,n,l){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",f,"overwrite",n,"manual",l,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!n&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")}); -else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var c=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=c&&(c.viewState=this.ui.editor.graph.getViewState(),c.needsUpdate=!0)}c=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return c}; +else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=e)e(q);else throw q;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var c=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=c&&(c.viewState=this.ui.editor.graph.getViewState(),c.needsUpdate=!0)}c=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return c}; DrawioFile.prototype.updateFileData=function(){this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,f){}; DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1}; DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,c,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,c,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""}; @@ -3042,7 +3043,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()}; DrawioFile.prototype.createSecret=function(b){var c=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(c):this.sync.createToken(c,mxUtils.bind(this,function(e){b(c,e)}),mxUtils.bind(this,function(){b(c)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()}; DrawioFile.prototype.fileSaved=function(b,c,e,f,n){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var l=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(l),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=e&&e()):this.sync.fileSaved(l,c,e,f,n)}catch(k){this.invalidChecksum=this.inConflictState= -!0;this.descriptorChanged();null!=f&&f(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,k)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; +!0;this.descriptorChanged();null!=f&&f(k);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,k);else{var q=this.getCurrentUser(),d=null!=q?q.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,k)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}; DrawioFile.prototype.autosave=function(b,c,e,f){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosavethis.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; @@ -3051,10 +3052,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,f,n,l){DrawioFile.call(this,b,c);this.title=e;this.mode=f?null:App.MODE_DEVICE;this.fileHandle=n;this.desc=l};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title}; LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,c,e){this.saveAs(this.title,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b}; LocalFile.prototype.getLatestVersion=function(b,c){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,c)}; -LocalFile.prototype.saveFile=function(b,c,e,f,n){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;n||this.updateFileData();var l=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),k=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this, +LocalFile.prototype.saveFile=function(b,c,e,f,n){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;n||this.updateFileData();var l=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var q=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),k=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this, function(b){this.savingFile=!1;null!=f&&f({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[e],"conflict",this.desc.lastModified!=e.lastModified);this.desc.lastModified==e.lastModified?b.write(l?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this, -function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=b;this.fileSaved(t,c,d,g);this.removeDraft()}catch(y){g(y)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;g(b)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,l?"image/png":"text/xml",l);else if(c.length>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}k=b.charCodeAt(c++);if(c==g){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<< 4|(k&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);d+="=";break}f=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(k&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(f&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return d}; Editor.prototype.loadUrl=function(b,d,c,g,e,k,f,m){try{var l=!f&&(g||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var g=b.getText();if(l){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray(); -for(var g=Array(b.length),e=0;eg.indexOf("mxPageSelector")&&0n;n++)for(var l=n,t=0;8>t;t++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[n]=l;Editor.updateCRC=function(b,d,c,g){for(var e=0;e>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c>>8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,g,e){function k(b,d){var c= +e&&e(xa)}}))}catch(ia){null!=e&&e(ia)}}),c,t)}catch(na){null!=e&&e(na)}};Editor.crcTable=[];for(var n=0;256>n;n++)for(var l=n,q=0;8>q;q++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[n]=l;Editor.updateCRC=function(b,d,c,g){for(var e=0;e>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c>>8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,g,e){function k(b,d){var c= l;l+=d;return b.substring(c,l)}function f(b){b=k(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function m(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var l=0;if(k(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(k(b,4),"IHDR"!=k(b,4))null!=e&&e();else{k(b,17);e=b.substring(0,l);do{var p=f(b);if("IDAT"==k(b,4)){e=b.substring(0, l-8);"pHYs"==d&&"dpi"==c?(c=Math.round(g/.0254),c=m(c)+m(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+g;g=4294967295;g=Editor.updateCRC(g,d,0,4);g=Editor.updateCRC(g,c,0,c.length);e+=m(c.length)+d+c+m(g^4294967295);e+=b.substring(l-8,b.length);break}e+=b.substring(l-8,l-4+p);k(b,p);k(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats"; var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&& -(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile(); +(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile(); return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,g=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var g=new ChangePageSetup(d);g.ignoreColor=!0;g.ignoreImage= !0;g.shadowVisible=b;c.model.execute(g)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(g.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(g,60));b.appendChild(g)}return b};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=p.apply(this,arguments);var d=this.editorUi, c=d.editor.graph;if(c.isEnabled()){var g=d.getCurrentFile();if(null!=g&&g.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&g.isModified()&&g.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&& @@ -3212,32 +3213,32 @@ null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPro function(){var b=this.editorUi.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0c.size&&(f=f.slice(0,c.size));d=f.join(",");null!=c.countProperty&&(n.setCellStyles(c.countProperty,f.length,n.getSelectionCells()),e.push(c.countProperty),k.push(f.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);k.push(d);if(null!=c.dependentProps)for(b=0;bd)p=p.slice(0,d);else for(var u=p.length;up.max&&(b=p.max);b=encodeURIComponent(("int"==y?parseInt(b):b)+"");g(d,b,p)}var f=document.createElement("input"); -e(t,f,!0);f.value=decodeURIComponent(c);f.className="gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(f.type="number",f.step="int"==y?"1":"any",null!=p.min&&(f.min=parseFloat(p.min)),null!=p.max&&(f.max=parseFloat(p.max)));b.appendChild(f);mxEvent.addListener(f,"keypress",function(b){13==b.keyCode&&k()});f.focus();mxEvent.addListener(f,"blur",function(){k()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){g(d,"",p,p.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width= -"25px",u.style["float"]="right",u.className="geColorBtn",t.appendChild(u));x.appendChild(t);return x}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position="relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var y=document.createElement("tr");y.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var t=document.createElement("img");t.src=Sidebar.prototype.expandedImage; -t.style.verticalAlign="middle";x.appendChild(t);mxUtils.write(x,mxResources.get("property"));y.style.cursor="pointer";var B=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){t.src=Sidebar.prototype.collapsedImage;c="none";for(var g=b.childNodes.length-1;0<=g;g--)try{var e=b.childNodes[g],k=e.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||b.removeChild(e)}catch(wa){}}else t.src=Sidebar.prototype.expandedImage,c="";for(g=0;gp.max&&(b=p.max);b=encodeURIComponent(("int"==y?parseInt(b):b)+"");g(d,b,p)}var f=document.createElement("input"); +e(q,f,!0);f.value=decodeURIComponent(c);f.className="gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(f.type="number",f.step="int"==y?"1":"any",null!=p.min&&(f.min=parseFloat(p.min)),null!=p.max&&(f.max=parseFloat(p.max)));b.appendChild(f);mxEvent.addListener(f,"keypress",function(b){13==b.keyCode&&k()});f.focus();mxEvent.addListener(f,"blur",function(){k()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(t,function(b){g(d,"",p,p.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width= +"25px",u.style["float"]="right",u.className="geColorBtn",q.appendChild(u));x.appendChild(q);return x}var t=this,n=this.editorUi.editor.graph,u=[];b.style.position="relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var y=document.createElement("tr");y.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var q=document.createElement("img");q.src=Sidebar.prototype.expandedImage; +q.style.verticalAlign="middle";x.appendChild(q);mxUtils.write(x,mxResources.get("property"));y.style.cursor="pointer";var B=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),c;if(t.editorUi.propertiesCollapsed){q.src=Sidebar.prototype.collapsedImage;c="none";for(var g=b.childNodes.length-1;0<=g;g--)try{var e=b.childNodes[g],k=e.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||b.removeChild(e)}catch(wa){}}else q.src=Sidebar.prototype.expandedImage,c="";for(g=0;g=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var f="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+ Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):b.fill||mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");d.style.border=b.stroke==mxConstants.NONE?f+" transparent":""==b.stroke?f+" "+mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):f+ " "+(b.stroke||mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=b.title&&d.setAttribute("title",b.title)}else{var f=mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(g.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=f;d.style.border="1px solid "+m}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var f=0;f=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+l+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(u,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+l+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1=this.defaultColorSchemes.length&&b.appendChild(f);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.editorUi.getSelectionState(),c=this.editorUi.editor.graph,g=null;1==d.cells.length&&(g=mxUtils.button(mxResources.get("editStyle"), +4)&&mxUtils.br(e),d(b[f])});null==this.format.currentScheme?t(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):t(this.format.currentScheme);var l=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+l+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(u,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+l+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1=this.defaultColorSchemes.length&&b.appendChild(f);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.editorUi.getSelectionState(),c=this.editorUi.editor.graph,g=null;1==d.cells.length&&(g=mxUtils.button(mxResources.get("editStyle"), mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),g.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),g.style.width="210px",g.style.marginBottom="2px",b.appendChild(g));c=1==d.cells.length?c.view.getState(d.cells[0]):null;null!=c&&null!=c.shape&&null!=c.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title", mxResources.get("editShape")),d.style.marginBottom="2px",null==g?d.style.width="210px":(g.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0mxUtils.indexOf(f.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",k?Editor.visibleImage:Editor.hiddenImage); -n.setAttribute("title",mxResources.get(k?"hideIt":"show",[b]));mxUtils.setOpacity(n,k?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(d||Editor.isDarkMode())n.style.filter="invert(100%)";q.appendChild(n);mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(f.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(f.hiddenTags,b)):(0>c?f.hiddenTags.push(b):0<=c&&f.hiddenTags.splice(c,1),g(),f.refresh());mxEvent.consume(d)});p.appendChild(q);q=document.createElement("td"); -q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,k?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=f.getCellsForTags([b],null,null,!0);f.isEnabled()?f.setSelectionCells(c):f.highlightCells(c)}else if(k&& -0mxUtils.indexOf(m,g[e])&&m.push(g[e]);m.sort();f.isSelectionEmpty()?k(m):k(m,f.getCommonTagsForCells(f.getSelectionCells()))}}); -f.selectionModel.addListener(mxEvent.CHANGE,u);f.model.addListener(mxEvent.CHANGE,u);f.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";f.isEnabled()&&(v.appendChild(q),v.appendChild(n),l.appendChild(v));return{div:l,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts, +t){G.apply(this,arguments);Graph.processFontAttributes(t)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function g(){for(var b=f.getSelectionCells(),d=[],c=0;cmxUtils.indexOf(f.hiddenTags,b),p=document.createElement("tr"),t=document.createElement("td");t.style.align="center";t.style.width="16px";var n=document.createElement("img");n.setAttribute("src",k?Editor.visibleImage:Editor.hiddenImage); +n.setAttribute("title",mxResources.get(k?"hideIt":"show",[b]));mxUtils.setOpacity(n,k?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(d||Editor.isDarkMode())n.style.filter="invert(100%)";t.appendChild(n);mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(f.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(f.hiddenTags,b)):(0>c?f.hiddenTags.push(b):0<=c&&f.hiddenTags.splice(c,1),g(),f.refresh());mxEvent.consume(d)});p.appendChild(t);t=document.createElement("td"); +t.style.overflow="hidden";t.style.whiteSpace="nowrap";t.style.textOverflow="ellipsis";t.style.verticalAlign="middle";t.style.cursor="pointer";t.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,k?100:40);t.appendChild(a);mxEvent.addListener(t,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=f.getCellsForTags([b],null,null,!0);f.isEnabled()?f.setSelectionCells(c):f.highlightCells(c)}else if(k&& +0mxUtils.indexOf(m,g[e])&&m.push(g[e]);m.sort();f.isSelectionEmpty()?k(m):k(m,f.getCommonTagsForCells(f.getSelectionCells()))}}); +f.selectionModel.addListener(mxEvent.CHANGE,u);f.model.addListener(mxEvent.CHANGE,u);f.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";f.isEnabled()&&(v.appendChild(t),v.appendChild(n),l.appendChild(v));return{div:l,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts, b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var g=0;g'+mxUtils.htmlEntities(b)+""};mxGraphView.prototype.redrawEnumerationState=function(b){var d="1"==mxUtils.getValue(b.style,"enumerate",0);d&&null==b.secondLabel?(b.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),b.secondLabel.size=12,b.secondLabel.state=b,b.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(b,b.secondLabel)): @@ -3271,17 +3272,17 @@ d||null==b.secondLabel||(b.secondLabel.destroy(),b.secondLabel=null);d=b.secondL null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode), this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};var M=Graph.prototype.refresh;Graph.prototype.refresh=function(){M.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage), this.view.validateBackgroundImage())};var Q=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){Q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread), -null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,g=0,e=0,k=mxUtils.bind(this,function(){c||(c=!0,this.model.beginUpdate())}),f=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),m=mxUtils.bind(this,function(){0mxUtils.indexOf(p.tags.visible,u[v])&&0>mxUtils.indexOf(n,u[v])&&n.push(u[v]);this.hiddenTags=n;this.refresh()}0mxUtils.indexOf(p.tags.visible,u[v])&&0>mxUtils.indexOf(n,u[v])&&n.push(u[v]);this.hiddenTags=n;this.refresh()}0b.excludeCells.indexOf(c[e].id)&&g.push(c[e]);c=g}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;cthis.hiddenTags.length)return!1;for(var d=0;dmxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,g){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot()); -for(var k=0,f={},m=0;m=b.length)){for(var q=p=0;q=b.length)){for(var t=p=0;tmxUtils.indexOf(e,m)&&(g=0'),c.writeln(Editor.mathJaxWebkitCss), +t=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var n=d.getGraphBounds(),u=0,v=0,x=V.get(),q=1/d.pageScale,C=M.checked;if(C)var q=parseInt(B.value),Q=parseInt(F.value),q=Math.min(x.height*Q/(n.height/d.view.scale),x.width*q/(n.width/d.view.scale));else q=parseInt(A.value)/(100*d.pageScale),isNaN(q)&&(g=1/d.pageScale,A.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width* +g);x.height=Math.ceil(x.height*g);q*=g;!C&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,q,x,0,u,v,C);c.pageSelector=!1;c.mathEnabled=!1;y.checked&&(c.isCellVisible=function(b){return d.isCellSelected(b)});u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('");mxClient.IS_GC&&(c.writeln('"));null!=b.editor.fontCss&&(c.writeln('"));for(var g=d.getCustomFonts(),e=0;e'): (c.writeln('"))}};if("undefined"!==typeof MathJax){var N=c.renderPage;c.renderPage=function(d,c,g,e,k,f){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var l=N.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled|| !0:l.className="geDisableMathJax";return l}}u=null;v=e.shapeForegroundColor;C=e.shapeBackgroundColor;x=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.shapeForegroundColor="#000000",e.shapeBackgroundColor="#ffffff",e.refresh());c.open(null,null,k,!0);e.enableFlowAnimation=x;null!=u&&(e.shapeForegroundColor=v,e.shapeBackgroundColor=C,e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""== -x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,u,v,k,!0);k=d.getCustomFonts();if(null!=c.wnd)for(u=0;u'):(c.wnd.document.writeln('"))}f&& -(d.useCssTransforms=f,d.currentTranslate=m,d.currentScale=l,d.view.translate=p,d.view.scale=q);return c}var g=parseInt(Y.value)/100;isNaN(g)&&(g=1,Y.value="100 %");var g=.75*g,k=null,f=e.shapeForegroundColor,m=e.shapeBackgroundColor;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(k=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.shapeForegroundColor="#000000",e.shapeBackgroundColor="#ffffff",e.refresh());var p=u.value,n=v.value,x=!q.checked,t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b, -q.checked,p,n,M.checked,B.value,F.value,parseInt(A.value)/100,parseInt(Y.value)/100,V.get());else{x&&(x=y.checked||p==l&&n==l);if(!x&&null!=b.pages&&b.pages.length){var C=0,x=b.pages.length-1;q.checked||(C=parseInt(p)-1,x=parseInt(n)-1);for(var Q=C;Q<=x;Q++){var E=b.pages[Q],p=E==b.currentPage?e:null;if(null==p){p=b.createTemporaryGraph(e.stylesheet);p.shapeForegroundColor=e.shapeForegroundColor;p.shapeBackgroundColor=e.shapeBackgroundColor;var n=!0,C=!1,N=null,J=null;null==E.viewState&&null==E.root&& +x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,q,u,v,k,!0);k=d.getCustomFonts();if(null!=c.wnd)for(u=0;u'):(c.wnd.document.writeln('"))}f&& +(d.useCssTransforms=f,d.currentTranslate=m,d.currentScale=l,d.view.translate=p,d.view.scale=t);return c}var g=parseInt(Y.value)/100;isNaN(g)&&(g=1,Y.value="100 %");var g=.75*g,k=null,f=e.shapeForegroundColor,m=e.shapeBackgroundColor;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(k=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.shapeForegroundColor="#000000",e.shapeBackgroundColor="#ffffff",e.refresh());var p=u.value,n=v.value,x=!t.checked,q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b, +t.checked,p,n,M.checked,B.value,F.value,parseInt(A.value)/100,parseInt(Y.value)/100,V.get());else{x&&(x=y.checked||p==l&&n==l);if(!x&&null!=b.pages&&b.pages.length){var C=0,x=b.pages.length-1;t.checked||(C=parseInt(p)-1,x=parseInt(n)-1);for(var Q=C;Q<=x;Q++){var E=b.pages[Q],p=E==b.currentPage?e:null;if(null==p){p=b.createTemporaryGraph(e.stylesheet);p.shapeForegroundColor=e.shapeForegroundColor;p.shapeBackgroundColor=e.shapeBackgroundColor;var n=!0,C=!1,N=null,J=null;null==E.viewState&&null==E.root&& b.updatePageRoot(E);null!=E.viewState&&(n=E.viewState.pageVisible,C=E.viewState.mathEnabled,N=E.viewState.background,J=E.viewState.backgroundImage,p.extFonts=E.viewState.extFonts);null!=J&&null!=J.originalSrc&&(J=b.createImageForPageLink(J.originalSrc,E));p.background=N;p.backgroundImage=null!=J?new mxImage(J.src,J.width,J.height,J.x,J.y):null;p.pageVisible=n;p.mathEnabled=C;var G=p.getGraphBounds;p.getGraphBounds=function(){var b=G.apply(this,arguments),d=this.backgroundImage;if(null!=d&&null!=d.width&& -null!=d.height){var c=this.view.translate,g=this.view.scale,b=mxRectangle.fromRectangle(b);b.add(new mxRectangle((c.x+d.x)*g,(c.y+d.y)*g,d.width*g,d.height*g))}return b};var D=p.getGlobalVariable;p.getGlobalVariable=function(d){return"page"==d?E.getName():"pagenumber"==d?Q+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(p.container);b.updatePageRoot(E);p.model.setRoot(E.root)}t=c(p,t,Q!=x);p!=e&&p.container.parentNode.removeChild(p.container)}}else t= -c(e);null==t?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(x=t.wnd.document,d&&(t.wnd.IMMEDIATE_PRINT=!0),x.writeln('