Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js/viewer.min.js')
-rw-r--r--src/main/webapp/js/viewer.min.js2424
1 files changed, 1212 insertions, 1212 deletions
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index d3800a3d..95673381 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -110,7 +110,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"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.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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:"20.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.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.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&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.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]"!==
@@ -1990,12 +1990,12 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,aa=Math.max(1,Math.round((I.width-k-C)/2)),ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";aa+=I.x;ca+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+
-"px",ca+=b.embedViewport.y,aa+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var ba=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(aa,ca,k,n);aa=D.x;ca=D.y;ba.style.width=k+"px";ba.style.height=n+"px";ba.style.left=aa+"px";ba.style.top=ca+"px";ba.style.zIndex=this.zIndex;ba.appendChild(e);document.body.appendChild(ba);!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ca+14+"px",t.style.left=aa+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Z=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Z=!0}),null,mxUtils.bind(this,function(qa){Z&&(b.hideDialog(!0),Z=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
-g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");aa=Math.max(1,Math.round((qa.width-k-C)/2));ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(aa,ca,k,n);aa=qa.x;ca=qa.y;ba.style.left=aa+"px";ba.style.top=ca+"px";ba.style.width=k+"px";ba.style.height=
-n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=aa+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Z=Math.max(1,Math.round((I.width-k-C)/2)),ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Z+=I.x;ca+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+ca+=b.embedViewport.y,Z+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var aa=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Z,ca,k,n);Z=D.x;ca=D.y;aa.style.width=k+"px";aa.style.height=n+"px";aa.style.left=Z+"px";aa.style.top=ca+"px";aa.style.zIndex=this.zIndex;aa.appendChild(e);document.body.appendChild(aa);!d&&e.clientHeight>aa.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ca+14+"px",t.style.left=Z+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){Y=!0}),null,mxUtils.bind(this,function(qa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
+g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Z=Math.max(1,Math.round((qa.width-k-C)/2));ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(Z,ca,k,n);Z=qa.x;ca=qa.y;aa.style.left=Z+"px";aa.style.top=ca+"px";aa.style.width=k+"px";aa.style.height=
+n+"px";!d&&e.clientHeight>aa.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=Z+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=aa;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+
@@ -2003,8 +2003,8 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,aa=1/k.pageScale;if(C){var ca=E.checked?1:parseInt(m.value);isNaN(ca)||(aa=mxUtils.getScaleForPageCount(ca,k,G))}k.getGraphBounds();var ba=ca=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);aa*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ca-=I.x*G.width,ba-=I.y*
-G.height):C=!0;C=PrintDialog.createPrintPreview(k,aa,G,0,ca,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Z=1/k.pageScale;if(C){var ca=E.checked?1:parseInt(m.value);isNaN(ca)||(Z=mxUtils.getScaleForPageCount(ca,k,G))}k.getGraphBounds();var aa=ca=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Z*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ca-=I.x*G.width,aa-=I.y*
+G.height):C=!0;C=PrintDialog.createPrintPreview(k,Z,G,0,ca,aa,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);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";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
@@ -2015,29 +2015,29 @@ PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.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=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(m||"none",function(aa){m=aa;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+"click",function(G){b.pickColor(m||"none",function(Z){m=Z;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
-"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(aa,ca){ca||(C=aa,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
+"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Z,ca){ca||(C=Z,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
"geBtn";b.editor.cancelFirst&&d.appendChild(y);I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});I.className="geBtn gePrimaryBtn";
d.appendChild(I);b.editor.cancelFirst||d.appendChild(y);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,N,Y){if(Y||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(N=0;N<C.length;N++)Y=C[N],ca?"custom"==Y.key&&(d.value=Y.key,ca=!1):null!=Y.format&&("a4"==Y.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==Y.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-Y.format.width&&k.height==Y.format.height?(d.value=Y.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==Y.format.height&&k.height==Y.format.width&&(d.value=Y.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
+PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,Q,X){if(X||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(Q=0;Q<C.length;Q++)X=C[Q],ca?"custom"==X.key&&(d.value=X.key,ca=!1):null!=X.format&&("a4"==X.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==X.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
+X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.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 f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var aa=document.createElement("option");aa.setAttribute("value",
-G.key);mxUtils.write(aa,G.title);d.appendChild(aa)}var ca=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var ba=k,Z=function(qa,N){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
-Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));N&&ca||qa.width==ba.width&&qa.height==ba.height||(ba=qa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Z(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;Z(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Z);mxEvent.addListener(q,"click",Z);mxEvent.addListener(y,"blur",Z);mxEvent.addListener(y,"click",Z);mxEvent.addListener(E,
-"change",Z);mxEvent.addListener(t,"change",Z);mxEvent.addListener(d,"change",function(qa){ca="custom"==d.value;Z(qa,!0)});Z();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return ba},widthInput:q,heightInput:y}};
+"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Z=document.createElement("option");Z.setAttribute("value",
+G.key);mxUtils.write(Z,G.title);d.appendChild(Z)}var ca=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var aa=k,Y=function(qa,Q){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));Q&&ca||qa.width==aa.width&&qa.height==aa.height||(aa=qa,null!=n&&n(aa))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;Y(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(E,
+"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(qa){ca="custom"==d.value;Y(qa,!0)});Y();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return aa},widthInput:q,heightInput:y}};
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,e,k,n,D,t,E,d,f,g,m,q,y){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(y?y+15:100)+"px";G.style.fontSize="10pt";G.style.width=(y?y:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var aa=
-document.createElement("input");aa.setAttribute("value",e||"");aa.style.marginLeft="4px";aa.style.width=null!=q?q+"px":"180px";var ca=mxUtils.button(k,function(){if(null==t||t(aa.value))f&&b.hideDialog(),n(aa.value)});ca.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(aa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var ba=F.parentNode;if(null!=ba){var Z=null;mxEvent.addListener(ba,
-"dragleave",function(qa){null!=Z&&(Z.style.backgroundColor="",Z=null);qa.stopPropagation();qa.preventDefault()});mxEvent.addListener(ba,"dragover",mxUtils.bind(this,function(qa){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=aa,Z.style.backgroundColor="#ebf2f9");qa.stopPropagation();qa.preventDefault()}));mxEvent.addListener(ba,"drop",mxUtils.bind(this,function(qa){null!=Z&&(Z.style.backgroundColor="",Z=null);0<=mxUtils.indexOf(qa.dataTransfer.types,"text/uri-list")&&(aa.value=decodeURIComponent(qa.dataTransfer.getData("text/uri-list")),
-ca.click());qa.stopPropagation();qa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(aa);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,aa,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
-":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,aa,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),aa.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");
-G.colSpan=2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(aa,"keypress",function(ba){13==ba.keyCode&&ca.click()});G.appendChild(ca);b.editor.cancelFirst||
-G.appendChild(m);I.appendChild(G);C.appendChild(I);F.appendChild(C);this.container=F};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,m,q,y){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(y?y+15:100)+"px";G.style.fontSize="10pt";G.style.width=(y?y:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Z=
+document.createElement("input");Z.setAttribute("value",e||"");Z.style.marginLeft="4px";Z.style.width=null!=q?q+"px":"180px";var ca=mxUtils.button(k,function(){if(null==t||t(Z.value))f&&b.hideDialog(),n(Z.value)});ca.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var aa=F.parentNode;if(null!=aa){var Y=null;mxEvent.addListener(aa,"dragleave",
+function(qa){null!=Y&&(Y.style.backgroundColor="",Y=null);qa.stopPropagation();qa.preventDefault()});mxEvent.addListener(aa,"dragover",mxUtils.bind(this,function(qa){null==Y&&(!mxClient.IS_IE||10<document.documentMode)&&(Y=Z,Y.style.backgroundColor="#ebf2f9");qa.stopPropagation();qa.preventDefault()}));mxEvent.addListener(aa,"drop",mxUtils.bind(this,function(qa){null!=Y&&(Y.style.backgroundColor="",Y=null);0<=mxUtils.indexOf(qa.dataTransfer.types,"text/uri-list")&&(Z.value=decodeURIComponent(qa.dataTransfer.getData("text/uri-list")),
+ca.click());qa.stopPropagation();qa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Z);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,Z,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
+":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,Z,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),Z.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");G.colSpan=
+2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Z,"keypress",function(aa){13==aa.keyCode&&ca.click()});G.appendChild(ca);b.editor.cancelFirst||G.appendChild(m);
+I.appendChild(G);C.appendChild(I);F.appendChild(C);this.container=F};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
D();return n};
@@ -2051,41 +2051,41 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=nul
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
-d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,aa=F.x+d,ca=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Z=ba==this.horizontalPageBreaks?I:G,qa=0;qa<=Z;qa++){var N=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
-Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(aa),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(ca))];null!=ba[qa]?(ba[qa].points=N,ba[qa].redraw()):(N=new mxPolyline(N,this.pageBreakColor),N.dialect=this.dialect,N.isDashed=this.pageBreakDashed,N.pointerEvents=!1,N.init(this.view.backgroundPane),N.redraw(),ba[qa]=N)}for(qa=Z;qa<ba.length;qa++)ba[qa].destroy();ba.splice(Z,ba.length-Z)}});
+d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Z=F.x+d,ca=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(aa){if(null!=aa){for(var Y=aa==this.horizontalPageBreaks?I:G,qa=0;qa<=Y;qa++){var Q=aa==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(Z),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(ca))];null!=aa[qa]?(aa[qa].points=Q,aa[qa].redraw()):(Q=new mxPolyline(Q,this.pageBreakColor),Q.dialect=this.dialect,Q.isDashed=this.pageBreakDashed,Q.pointerEvents=!1,Q.init(this.view.backgroundPane),Q.redraw(),aa[qa]=Q)}for(qa=Y;qa<aa.length;qa++)aa[qa].destroy();aa.splice(Y,aa.length-Y)}});
E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var J=D.apply(this,arguments),W=this.backgroundImage;if(null!=W&&null!=W.width&&null!=W.height){var Q=this.view.translate,S=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((Q.x+W.x)*S,(Q.y+W.y)*S,W.width*S,W.height*S))}return J};n.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(J,W){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(J){return!mxEvent.isPopupTrigger(J.getEvent())});this.actions=new Actions(this);this.menus=
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var O=D.apply(this,arguments),N=this.backgroundImage;if(null!=N&&null!=N.width&&null!=N.height){var ba=this.view.translate,la=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((ba.x+N.x)*la,(ba.y+N.y)*la,N.width*la,N.height*la))}return O};n.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(O,N){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(J){try{var W=n.getCellStyle(J,!1),Q=[],S=[],ha;for(ha in W)Q.push(W[ha]),S.push(ha);n.getModel().isEdge(J)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",S,"values",Q,"cells",[J]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
-n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);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(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(J,W,Q,S,ha,la,u){S=null!=S?S:n.currentVertexStyle;ha=null!=ha?ha:n.currentEdgeStyle;la=null!=la?la:!0;Q=null!=Q?Q:n.getModel();if(u){u=[];for(var H=0;H<J.length;H++)u=u.concat(Q.getDescendants(J[H]));J=u}Q.beginUpdate();try{for(H=0;H<J.length;H++){var O=J[H];if(W)var T=["fontSize","fontFamily",
-"fontColor"];else{var R=Q.getStyle(O),da=null!=R?R.split(";"):[];T=t.slice();for(var P=0;P<da.length;P++){var ma=da[P],ra=ma.indexOf("=");if(0<=ra){var xa=ma.substring(0,ra),ta=mxUtils.indexOf(T,xa);0<=ta&&T.splice(ta,1);for(u=0;u<m.length;u++){var Aa=m[u];if(0<=mxUtils.indexOf(Aa,xa))for(var Ca=0;Ca<Aa.length;Ca++){var Ba=mxUtils.indexOf(T,Aa[Ca]);0<=Ba&&T.splice(Ba,1)}}}}}var sa=Q.isEdge(O);u=sa?ha:S;var Oa=Q.getStyle(O);for(P=0;P<T.length;P++){xa=T[P];var Ta=u[xa];null!=Ta&&"edgeStyle"!=xa&&("shape"!=
-xa||sa)&&(!sa||la||0>mxUtils.indexOf(d,xa))&&(Oa=mxUtils.setStyle(Oa,xa,Ta))}Editor.simpleLabels&&(Oa=mxUtils.setStyle(mxUtils.setStyle(Oa,"html",null),"whiteSpace",null));Q.setStyle(O,Oa)}}finally{Q.endUpdate()}return J};n.addListener("cellsInserted",function(J,W){q(W.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(J,W){q(W.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,function(J){null==
-J&&(J=window.event);return n.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
-y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(J){if(null!=J){var W=mxEvent.getSource(J);if("A"==W.nodeName)for(;null!=W;){if("geHint"==W.className)return!0;W=W.parentNode}}return y(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
-!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(J){var W=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-
-W.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-W.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,W){return C||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){32!=J.which||n.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
-n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(J)!=n.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(J){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&
-(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(J){return aa.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var ca=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||ca.apply(this,arguments)};var ba=!1,Z=null,qa=null,N=null,
-Y=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,W=[];null!=J;){var Q=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),W.push(J));J=Q}J=this.toolbar.fontMenu;Q=this.toolbar.sizeMenu;if(null==N)this.toolbar.createTextToolbar();else{for(var S=0;S<N.length;S++)this.toolbar.container.appendChild(N[S]);this.toolbar.fontMenu=Z;this.toolbar.sizeMenu=qa}ba=n.cellEditor.isContentEditing();
-Z=J;qa=Q;N=W}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);Y();if(n.cellEditor.isContentEditing()){var J=!1,W=function(){J||(J=!0,window.setTimeout(function(){var Q=n.getSelectedEditingElement();null!=Q&&(Q=mxUtils.getCurrentStyle(Q),null!=Q&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(Q.fontFamily)),ea.toolbar.setFontSize(parseInt(Q.fontSize))));J=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",W);mxEvent.addListener(n.cellEditor.textarea,
-"touchend",W);mxEvent.addListener(n.cellEditor.textarea,"mouseup",W);mxEvent.addListener(n.cellEditor.textarea,"keyup",W);W()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(J,W){try{ja.apply(this,arguments),Y()}catch(Q){ea.handleError(Q)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(J){}var V=n.fireMouseEvent;n.fireMouseEvent=function(J,W,Q){J==mxEvent.MOUSE_DOWN&&
-this.container.focus();V.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(J,W,Q){this.menus.createPopupMenu(J,W,Q)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(J,W){var Q=[W.getProperty("cell")];W.getProperty("terminalInserted")&&
-(Q.push(W.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(Q[Q.length-1]))},0));q(Q)});this.addListener("styleChanged",mxUtils.bind(this,function(J,W){var Q=W.getProperty("cells"),S=J=!1;if(0<Q.length)for(var ha=0;ha<Q.length&&(J=n.getModel().isVertex(Q[ha])||J,!(S=n.getModel().isEdge(Q[ha])||S)||!J);ha++);else S=J=!0;Q=W.getProperty("keys");W=W.getProperty("values");for(ha=0;ha<Q.length;ha++){var la=0<=mxUtils.indexOf(f,Q[ha]);if("strokeColor"!=
-Q[ha]||null!=W[ha]&&"none"!=W[ha])if(0<=mxUtils.indexOf(E,Q[ha]))S||0<=mxUtils.indexOf(g,Q[ha])?null==W[ha]?delete n.currentEdgeStyle[Q[ha]]:n.currentEdgeStyle[Q[ha]]=W[ha]:J&&0<=mxUtils.indexOf(t,Q[ha])&&(null==W[ha]?delete n.currentVertexStyle[Q[ha]]:n.currentVertexStyle[Q[ha]]=W[ha]);else if(0<=mxUtils.indexOf(t,Q[ha])){if(J||la)null==W[ha]?delete n.currentVertexStyle[Q[ha]]:n.currentVertexStyle[Q[ha]]=W[ha];if(S||la||0<=mxUtils.indexOf(g,Q[ha]))null==W[ha]?delete n.currentEdgeStyle[Q[ha]]:n.currentEdgeStyle[Q[ha]]=
-W[ha]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
-n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&
-(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var J=n.currentVertexStyle.fontFamily||"Helvetica",W=String(n.currentVertexStyle.fontSize||"12"),Q=n.getView().getState(n.getSelectionCell());null!=Q&&(J=
-Q.style[mxConstants.STYLE_FONTFAMILY]||J,W=Q.style[mxConstants.STYLE_FONTSIZE]||W,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(W)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(J,W){J=W.getProperty("cells");W=W.getProperty("parent");null!=W&&n.getModel().isLayer(W)&&!n.isCellVisible(W)&&null!=J&&0<J.length&&n.getModel().setVisible(W,!0)});this.gestureHandler=
-mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
-this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
-n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(O){try{var N=n.getCellStyle(O,!1),ba=[],la=[],u;for(u in N)ba.push(N[u]),la.push(u);n.getModel().isEdge(O)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ba,"cells",[O]));n.getModel().isEdge(O)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
+mxUtils.clone(n.defaultEdgeStyle);n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);f=g=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var m=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<m.length;e++)0>mxUtils.indexOf(t,m[e])&&t.push(m[e]);var q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),y=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
+["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<y.length;e++)for(k=0;k<y[e].length;k++)t.push(y[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(O,N,ba,la,u,H,P){la=null!=la?la:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;ba=null!=ba?ba:n.getModel();if(P){P=[];for(var T=0;T<O.length;T++)P=P.concat(ba.getDescendants(O[T]));O=P}ba.beginUpdate();try{for(T=0;T<O.length;T++){var S=
+O[T];if(N)var da=["fontSize","fontFamily","fontColor"];else{var R=ba.getStyle(S),ma=null!=R?R.split(";"):[];da=t.slice();for(var ra=0;ra<ma.length;ra++){var xa=ma[ra],ta=xa.indexOf("=");if(0<=ta){var Aa=xa.substring(0,ta),Ca=mxUtils.indexOf(da,Aa);0<=Ca&&da.splice(Ca,1);for(P=0;P<y.length;P++){var Ba=y[P];if(0<=mxUtils.indexOf(Ba,Aa))for(var sa=0;sa<Ba.length;sa++){var Pa=mxUtils.indexOf(da,Ba[sa]);0<=Pa&&da.splice(Pa,1)}}}}}var Ta=ba.isEdge(S);P=Ta?u:la;var Oa=ba.getStyle(S);for(ra=0;ra<da.length;ra++){Aa=
+da[ra];var Xa=P[Aa];null!=Xa&&"edgeStyle"!=Aa&&("shape"!=Aa||Ta)&&(!Ta||H||0>mxUtils.indexOf(d,Aa))&&(Oa=mxUtils.setStyle(Oa,Aa,Xa))}Editor.simpleLabels&&(Oa=mxUtils.setStyle(mxUtils.setStyle(Oa,"html",null),"whiteSpace",null));ba.setStyle(S,Oa)}}finally{ba.endUpdate()}return O};n.addListener("cellsInserted",function(O,N){F(N.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(O,N){F(N.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
+this.refresh();var C=mxUtils.bind(this,function(O){null==O&&(O=window.event);return n.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
+this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(O){if(null!=O){var N=mxEvent.getSource(O);if("A"==N.nodeName)for(;null!=N;){if("geHint"==N.className)return!0;N=N.parentNode}}return C(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=ia.hoverIcons&&ia.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(O){var N=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-N.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-N.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Z=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,N){return G||Z.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||n.isEditing()?mxEvent.isConsumed(O)||
+27!=O.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(O)!=n.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var ca=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(O){return ca.apply(this,arguments)||G||
+mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(O){return aa.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var Y=n.isZoomWheelEvent;
+n.isZoomWheelEvent=function(){return G||Y.apply(this,arguments)};var qa=!1,Q=null,X=null,fa=null,ka=mxUtils.bind(this,function(){if(null!=this.toolbar&&qa!=n.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,N=[];null!=O;){var ba=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),N.push(O));O=ba}O=this.toolbar.fontMenu;ba=this.toolbar.sizeMenu;if(null==fa)this.toolbar.createTextToolbar();else{for(var la=0;la<fa.length;la++)this.toolbar.container.appendChild(fa[la]);
+this.toolbar.fontMenu=Q;this.toolbar.sizeMenu=X}qa=n.cellEditor.isContentEditing();Q=O;X=ba;fa=N}}),ia=this,V=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){V.apply(this,arguments);ka();if(n.cellEditor.isContentEditing()){var O=!1,N=function(){O||(O=!0,window.setTimeout(function(){var ba=n.getSelectedEditingElement();null!=ba&&(ba=mxUtils.getCurrentStyle(ba),null!=ba&&null!=ia.toolbar&&(ia.toolbar.setFontName(Graph.stripQuotes(ba.fontFamily)),ia.toolbar.setFontSize(parseInt(ba.fontSize))));
+O=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",N);mxEvent.addListener(n.cellEditor.textarea,"touchend",N);mxEvent.addListener(n.cellEditor.textarea,"mouseup",N);mxEvent.addListener(n.cellEditor.textarea,"keyup",N);N()}};var L=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(O,N){try{L.apply(this,arguments),ka()}catch(ba){ia.handleError(ba)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(O){}var ea=
+n.fireMouseEvent;n.fireMouseEvent=function(O,N,ba){O==mxEvent.MOUSE_DOWN&&this.container.focus();ea.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,N,ba){this.menus.createPopupMenu(O,N,ba)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
+function(O,N){var ba=[N.getProperty("cell")];N.getProperty("terminalInserted")&&(ba.push(N.getProperty("terminal")),window.setTimeout(function(){null!=ia.hoverIcons&&ia.hoverIcons.update(n.view.getState(ba[ba.length-1]))},0));F(ba)});this.addListener("styleChanged",mxUtils.bind(this,function(O,N){var ba=N.getProperty("cells"),la=O=!1;if(0<ba.length)for(var u=0;u<ba.length&&(O=n.getModel().isVertex(ba[u])||O,!(la=n.getModel().isEdge(ba[u])||la)||!O);u++);else la=O=!0;O=O&&!f;la=la&&!g;ba=N.getProperty("keys");
+N=N.getProperty("values");for(u=0;u<ba.length;u++){var H=0<=mxUtils.indexOf(m,ba[u]);if("strokeColor"!=ba[u]||null!=N[u]&&"none"!=N[u])if(0<=mxUtils.indexOf(E,ba[u]))la||0<=mxUtils.indexOf(q,ba[u])?null==N[u]?delete n.currentEdgeStyle[ba[u]]:n.currentEdgeStyle[ba[u]]=N[u]:O&&0<=mxUtils.indexOf(t,ba[u])&&(null==N[u]?delete n.currentVertexStyle[ba[u]]:n.currentVertexStyle[ba[u]]=N[u]);else if(0<=mxUtils.indexOf(t,ba[u])){if(O||H)null==N[u]?delete n.currentVertexStyle[ba[u]]:n.currentVertexStyle[ba[u]]=
+N[u];if(la||H||0<=mxUtils.indexOf(q,ba[u]))null==N[u]?delete n.currentEdgeStyle[ba[u]]:n.currentEdgeStyle[ba[u]]=N[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
+"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var O=n.currentVertexStyle.fontFamily||"Helvetica",
+N=String(n.currentVertexStyle.fontSize||"12"),ba=n.getView().getState(n.getSelectionCell());null!=ba&&(O=ba.style[mxConstants.STYLE_FONTFAMILY]||O,N=ba.style[mxConstants.STYLE_FONTSIZE]||N,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(N)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(O,N){O=N.getProperty("cells");N=N.getProperty("parent");null!=N&&n.getModel().isLayer(N)&&
+!n.isCellVisible(N)&&null!=O&&0<O.length&&n.getModel().setVisible(N,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
+this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=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;
@@ -2103,7 +2103,7 @@ EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;
b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var I=b.getCompositeParent(f.cell);y=b.getCellGeometry(I);for(m.consume();null!=I&&b.model.isVertex(I)&&null!=y&&y.relative;)cell=
I,I=b.model.getParent(cell),y=b.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),I,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
-g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(aa){null!=aa&&b.connectVertex(I,q,b.defaultEdgeLength,y,!0,!0,function(ca,ba,Z){Z(aa);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(aa))},
+g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Z){null!=Z&&b.connectVertex(I,q,b.defaultEdgeLength,y,!0,!0,function(ca,aa,Y){Y(Z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Z))},
function(ca){b.selectCellsForConnectVertex(ca)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
@@ -2129,40 +2129,40 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
0),y=0;y<g.length;y++){m.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(E[y])&&null==f[mxObjectIdentity.get(m.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Q=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Q.x*S.width),this.scale*(this.translate.y+Q.y*S.height),this.scale*Q.width*S.width,
-this.scale*Q.height*S.height)};b.getPreferredPageSize=function(Q,S,ha){Q=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,Q.width*S.width,Q.height*S.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(Q,S,ha,la){if(null!=b.container&&!b.isViewer()){ha=null!=ha?ha:0;la=null!=la?la:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),O=b.view.translate,T=b.view.scale,
-R=mxRectangle.fromRectangle(u);R.x=R.x/T-O.x;R.y=R.y/T-O.y;R.width/=T;R.height/=T;O=b.container.scrollTop;var da=b.container.scrollLeft,P=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)P+=3;var ma=b.container.offsetWidth-P;P=b.container.offsetHeight-P;Q=Q?Math.max(.3,Math.min(S||1,ma/R.width)):T;S=(ma-Q*R.width)/2/Q;var ra=0==this.lightboxVerticalDivider?0:(P-Q*R.height)/this.lightboxVerticalDivider/Q;H&&(S=Math.max(S,0),ra=Math.max(ra,0));if(H||u.width<ma||u.height<
-P)b.view.scaleAndTranslate(Q,Math.floor(S-R.x),Math.floor(ra-R.y)),b.container.scrollTop=O*Q/T,b.container.scrollLeft=da*Q/T;else if(0!=ha||0!=la)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+ha/T),Math.floor(u.y+la/T))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
-n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Q){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Q){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),N=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*N.width),this.scale*(this.translate.y+O.y*N.height),this.scale*O.width*N.width,
+this.scale*O.height*N.height)};b.getPreferredPageSize=function(O,N,ba){O=this.getPageLayout();N=this.getPageSize();return new mxRectangle(0,0,O.width*N.width,O.height*N.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,N,ba,la){if(null!=b.container&&!b.isViewer()){ba=null!=ba?ba:0;la=null!=la?la:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),P=b.view.translate,T=b.view.scale,
+S=mxRectangle.fromRectangle(u);S.x=S.x/T-P.x;S.y=S.y/T-P.y;S.width/=T;S.height/=T;P=b.container.scrollTop;var da=b.container.scrollLeft,R=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)R+=3;var ma=b.container.offsetWidth-R;R=b.container.offsetHeight-R;O=O?Math.max(.3,Math.min(N||1,ma/S.width)):T;N=(ma-O*S.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(R-O*S.height)/this.lightboxVerticalDivider/O;H&&(N=Math.max(N,0),ra=Math.max(ra,0));if(H||u.width<ma||u.height<
+R)b.view.scaleAndTranslate(O,Math.floor(N-S.x),Math.floor(ra-S.y)),b.container.scrollTop=P*O/T,b.container.scrollLeft=da*O/T;else if(0!=ba||0!=la)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+ba/T),Math.floor(u.y+la/T))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
+n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";
this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var Q=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Q?parseInt(Q["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(Q,S,ha){E++;
-var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",Q);null!=ha&&la.setAttribute("title",ha);Q=document.createElement("img");Q.setAttribute("border","0");Q.setAttribute("src",S);Q.style.width="36px";Q.style.filter="invert(100%)";la.appendChild(Q);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(Q){window.location.href=D.backBtn.url;mxEvent.consume(Q)}),
-Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(Q){this.actions.get("previousPage").funct();mxEvent.consume(Q)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(Q){this.actions.get("nextPage").funct();mxEvent.consume(Q)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(Q){this.actions.get("zoomOut").funct();mxEvent.consume(Q)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){this.actions.get("zoomIn").funct();
-mxEvent.consume(Q)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(Q){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Q)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),Q||200)}),I=mxUtils.bind(this,function(Q){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Q||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(Q){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var S=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=S.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));S=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Q)}),Editor.layersImage,mxResources.get("layers")),aa=b.getModel();aa.addListener(mxEvent.CHANGE,function(){G.style.display=1<aa.getChildCount(aa.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,
-function(Q){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Q)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ca=this.lightboxToolbarActions[q];ca.elem=t(ca.fn,ca.icon,ca.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(Q){D.refreshBtn.url?
-window.location.href=D.refreshBtn.url:window.location.reload();mxEvent.consume(Q)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(Q){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Q)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
-document.body))&&t(mxUtils.bind(this,function(Q){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(Q))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(Q){mxEvent.isTouchEvent(Q)||
-(mxEvent.isShiftDown(Q)||I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Q){mxEvent.consume(Q)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Q){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Q)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Q){mxEvent.isShiftDown(Q)?C():I(100);mxEvent.consume(Q)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(Q){mxEvent.isTouchEvent(Q)||I(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Q,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Q,S){},mouseUp:function(Q,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ba&&Math.abs(this.startX-S.getGraphX())<ba&&Math.abs(this.startY-S.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Z=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Q=this.graph.getPagePadding(),S=this.graph.getPageSize();this.translate.x=Q.x-(this.x0||0)*S.width;this.translate.y=Q.y-(this.y0||0)*
-S.height}Z.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Q=this.getPageLayout(),S=this.getPagePadding(),ha=this.getPageSize(),la=Math.ceil(2*S.x+Q.width*ha.width),u=Math.ceil(2*S.y+Q.height*ha.height),H=b.minimumGraphSize;if(null==H||H.width!=la||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,la,u);la=S.x-Q.x*ha.width;S=S.y-Q.y*ha.height;this.autoTranslate||this.view.translate.x==la&&
-this.view.translate.y==S?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Q.x,this.view.y0=Q.y,Q=b.view.translate.x,ha=b.view.translate.y,b.view.setTranslate(la,S),b.container.scrollLeft+=Math.round((la-Q)*b.view.scale),b.container.scrollTop+=Math.round((S-ha)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var N=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,ja=null,
-V=null,J=null,W=function(Q){null!=ea&&window.clearTimeout(ea);0<=Q&&window.setTimeout(function(){if(!b.isMouseDown||V)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",N.style.transformOrigin="",mxClient.IS_SF?
-(Y.style.transform="scale(1)",N.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";N.style.transform=""},0)):(Y.style.transform="",N.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var S=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ha=mxUtils.getOffset(b.container),la=b.view.scale,u=0,H=0;null!=ka&&(u=b.container.offsetWidth/2-ka.x+ha.x,H=b.container.offsetHeight/2-ka.y+ha.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(u+=S.x-ja.x,H+=S.y-ja.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=J&&Y.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=V=ka=ja=ea=null}),null!=Q?Q:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(Q,S,ha,la){la=null!=la?la:this.zoomFactor;(S=S||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Q?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,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/=la,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==J&&""!=Y.getAttribute("filter")&&(J=Y.getAttribute("filter"),Y.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Q=S||null==ka?b.container.scrollLeft+
-b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=S||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,Y.style.transformOrigin=Q+"px "+la+"px",Y.style.transform="scale("+this.cumulativeZoomFactor+")",N.style.transformOrigin=Q+"px "+la+"px",N.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Q=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Q.style,
-"transform-origin",(S||null==ka?b.container.clientWidth/2+b.container.scrollLeft-Q.offsetLeft+"px":ka.x+b.container.scrollLeft-Q.offsetLeft-b.container.offsetLeft+"px")+" "+(S||null==ka?b.container.clientHeight/2+b.container.scrollTop-Q.offsetTop+"px":ka.y+b.container.scrollTop-Q.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Q.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());W(b.isFastZoomEnabled()?ha:0)};mxEvent.addGestureListeners(b.container,function(Q){null!=ea&&window.clearTimeout(ea)},null,function(Q){1!=b.cumulativeZoomFactor&&W(0)});mxEvent.addListener(b.container,"scroll",function(Q){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||W(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Q,S,ha,la,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ha&&b.isScrollWheelEvent(Q))ha=
-b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(Q)?b.view.setTranslate(ha.x+(S?-la:la),ha.y):b.view.setTranslate(ha.x,ha.y+(S?la:-la));else if(ha||b.isZoomWheelEvent(Q))for(var H=mxEvent.getSource(Q);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=u?new mxPoint(la,u):new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q)),V=ha,ha=b.zoomFactor,la=null,Q.ctrlKey&&null!=Q.deltaY&&40>Math.abs(Q.deltaY)&&Math.round(Q.deltaY)!=Q.deltaY?ha=1+Math.abs(Q.deltaY)/
-20*(ha-1):null!=Q.movementY&&"pointermove"==Q.type&&(ha=1+Math.max(1,Math.abs(Q.movementY))/20*(ha-1),la=-1),b.lazyZoom(S,null,la,ha),mxEvent.consume(Q),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Q){b.cumulativeZoomFactor=Q.scale;b.lazyZoom(0<Q.scale,!0);mxEvent.consume(Q)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(O,N,ba){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",O);null!=ba&&la.setAttribute("title",ba);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",N);O.style.width="36px";O.style.filter="invert(100%)";la.appendChild(O);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(O){window.location.href=D.backBtn.url;mxEvent.consume(O)}),
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
+this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();
+mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(O){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(O){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),O||200)}),I=mxUtils.bind(this,function(O){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(O){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var N=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=N.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));N=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=N.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),Z=b.getModel();Z.addListener(mxEvent.CHANGE,function(){G.style.display=1<Z.getChildCount(Z.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(O){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ca=this.lightboxToolbarActions[q];ca.elem=t(ca.fn,ca.icon,ca.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(O){D.refreshBtn.url?window.location.href=
+D.refreshBtn.url:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(O){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
+t(mxUtils.bind(this,function(O){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||(mxEvent.isShiftDown(O)||
+I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?C():I(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||I(30)}));var aa=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,N){this.startX=N.getGraphX();this.startY=N.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,N){},mouseUp:function(O,N){mxEvent.isTouchEvent(N.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<aa&&Math.abs(this.scrollTop-b.container.scrollTop)<
+aa&&Math.abs(this.startX-N.getGraphX())<aa&&Math.abs(this.startY-N.getGraphY())<aa&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var O=this.graph.getPagePadding(),N=this.graph.getPageSize();this.translate.x=O.x-(this.x0||0)*N.width;this.translate.y=O.y-(this.y0||0)*
+N.height}Y.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var O=this.getPageLayout(),N=this.getPagePadding(),ba=this.getPageSize(),la=Math.ceil(2*N.x+O.width*ba.width),u=Math.ceil(2*N.y+O.height*ba.height),H=b.minimumGraphSize;if(null==H||H.width!=la||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,la,u);la=N.x-O.x*ba.width;N=N.y-O.y*ba.height;this.autoTranslate||this.view.translate.x==la&&
+this.view.translate.y==N?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=O.x,this.view.y0=O.y,O=b.view.translate.x,ba=b.view.translate.y,b.view.setTranslate(la,N),b.container.scrollLeft+=Math.round((la-O)*b.view.scale),b.container.scrollTop+=Math.round((N-ba)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Q=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var fa=null,ka=null,ia=null,
+V=null,L=null,ea=function(O){null!=fa&&window.clearTimeout(fa);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||V)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",Q.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",Q.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";Q.style.transform=""},0)):(X.style.transform="",Q.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ba=mxUtils.getOffset(b.container),la=b.view.scale,u=0,H=0;null!=ka&&(u=b.container.offsetWidth/2-ka.x+ba.x,H=b.container.offsetHeight/2-ka.y+ba.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ia&&(u+=N.x-ia.x,H+=N.y-ia.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=L&&X.setAttribute("filter",L);b.cumulativeZoomFactor=1;L=V=ka=ia=fa=null}),null!=O?O:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(O,N,ba,la){la=null!=la?la:this.zoomFactor;(N=N||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,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/=la,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==L&&""!=X.getAttribute("filter")&&(L=X.getAttribute("filter"),X.removeAttribute("filter")),ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),O=N||null==ka?b.container.scrollLeft+
+b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=N||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=O+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",Q.style.transformOrigin=O+"px "+la+"px",Q.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(O=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(O.style,
+"transform-origin",(N||null==ka?b.container.clientWidth/2+b.container.scrollLeft-O.offsetLeft+"px":ka.x+b.container.scrollLeft-O.offsetLeft-b.container.offsetLeft+"px")+" "+(N||null==ka?b.container.clientHeight/2+b.container.scrollTop-O.offsetTop+"px":ka.y+b.container.scrollTop-O.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(O.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ea(b.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(b.container,function(O){null!=fa&&window.clearTimeout(fa)},null,function(O){1!=b.cumulativeZoomFactor&&ea(0)});mxEvent.addListener(b.container,"scroll",function(O){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||ea(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,N,ba,la,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ba&&b.isScrollWheelEvent(O))ba=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(ba.x+(N?-la:la),ba.y):b.view.setTranslate(ba.x,ba.y+(N?la:-la));else if(ba||b.isZoomWheelEvent(O))for(var H=mxEvent.getSource(O);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=u?new mxPoint(la,u):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),V=ba,ba=b.zoomFactor,la=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?ba=1+Math.abs(O.deltaY)/
+20*(ba-1):null!=O.movementY&&"pointermove"==O.type&&(ba=1+Math.max(1,Math.abs(O.movementY))/20*(ba-1),la=-1),b.lazyZoom(N,null,la,ba),mxEvent.consume(O),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2237,8 +2237,8 @@ EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.b
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
EditorUi.prototype.createKeyHandler=function(b){function e(q,y,F){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),I=0<C.length?C[0]:null;if(null!=I)if(F){n.getModel().beginUpdate();try{for(I=0;I<C.length;I++)if(n.getModel().isVertex(C[I])&&n.isCellResizable(C[I])){var G=n.getCellGeometry(C[I]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[I],
-G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var aa=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),y+1));else{var ca=n.graphHandler;null!=ca&&(null==ca.first&&ca.start(I,0,0,C),null!=ca.first&&(I=C=0,37==q?C=-y:
-38==q?I=-y:39==q?C=y:40==q&&(I=y),ca.currentDx+=C*aa,ca.currentDy+=I*aa,ca.checkPreview(),ca.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ca.first){var ba=ca.roundLength(ca.currentDx/aa),Z=ca.roundLength(ca.currentDy/aa);ca.moveCells(ca.cells,ba,Z);ca.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
+G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Z=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),y+1));else{var ca=n.graphHandler;null!=ca&&(null==ca.first&&ca.start(I,0,0,C),null!=ca.first&&(I=C=0,37==q?C=-y:
+38==q?I=-y:39==q?C=y:40==q&&(I=y),ca.currentDx+=C*Z,ca.currentDy+=I*Z,ca.checkPreview(),ca.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ca.first){var aa=ca.roundLength(ca.currentDx/Z),Y=ca.roundLength(ca.currentDy/Z);ca.moveCells(ca.cells,aa,Y);ca.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
@@ -2259,37 +2259,38 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGr
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(J){J=this.getCurrentCellStyle(J);
-return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,W){if("mouseDown"==W.getProperty("eventName")&&this.isEnabled()){J=W.getProperty("event");var Q=J.getState();W=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=Q)if(this.model.isEdge(Q.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),m=this.isCellSelected(Q.cell),f=Q,d=J,null!=Q.text&&null!=
-Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,J.getGraphX(),J.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var S=this.selectionCellsHandler.getHandler(Q.cell);null!=S&&null!=S.bends&&0<S.bends.length&&(g=S.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(S=this.selectionCellsHandler.getHandler(Q.cell),null==S||null==S.getHandleForEvent(J))){var ha=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),la=mxEvent.isTouchEvent(J.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;S=la+2;ha.grow(la);if(this.isTableCell(Q.cell)&&!this.isCellSelected(Q.cell)&&!(mxUtils.contains(Q,J.getGraphX()-S,J.getGraphY()-S)&&mxUtils.contains(Q,J.getGraphX()-S,J.getGraphY()+S)&&mxUtils.contains(Q,J.getGraphX()+S,J.getGraphY()+S)&&mxUtils.contains(Q,J.getGraphX()+S,J.getGraphY()-S))){var u=this.model.getParent(Q.cell);S=this.model.getParent(u);if(!this.isCellSelected(S)){la*=W;var H=2*la;if(this.model.getChildAt(S,0)!=u&&mxUtils.intersects(ha,new mxRectangle(Q.x,
-Q.y-la,Q.width,H))||this.model.getChildAt(u,0)!=Q.cell&&mxUtils.intersects(ha,new mxRectangle(Q.x-la,Q.y,H,Q.height))||mxUtils.intersects(ha,new mxRectangle(Q.x,Q.y+Q.height-la,Q.width,H))||mxUtils.intersects(ha,new mxRectangle(Q.x+Q.width-la,Q.y,H,Q.height)))u=this.selectionCellsHandler.isHandled(S),this.selectCellForEvent(S,J.getEvent()),S=this.selectionCellsHandler.getHandler(S),null!=S&&(la=S.getHandleForEvent(J),null!=la&&(S.start(J.getGraphX(),J.getGraphY(),la),S.blockDelayedSelection=!u,J.consume()))}}for(;!J.isConsumed()&&
-null!=Q&&(this.isTableCell(Q.cell)||this.isTableRow(Q.cell)||this.isTable(Q.cell));)this.isSwimlane(Q.cell)&&(S=this.getActualStartSize(Q.cell),(0<S.x||0<S.width)&&mxUtils.intersects(ha,new mxRectangle(Q.x+(S.x-S.width-1)*W+(0==S.x?Q.width:0),Q.y,1,Q.height))||(0<S.y||0<S.height)&&mxUtils.intersects(ha,new mxRectangle(Q.x,Q.y+(S.y-S.height-1)*W+(0==S.y?Q.height:0),Q.width,1)))&&(this.selectCellForEvent(Q.cell,J.getEvent()),S=this.selectionCellsHandler.getHandler(Q.cell),null!=S&&(la=mxEvent.CUSTOM_HANDLE-
-S.customHandles.length+1,S.start(J.getGraphX(),J.getGraphY(),la),J.consume())),Q=this.view.getState(this.model.getParent(Q.cell))}}}));this.addMouseListener({mouseDown:function(J,W){},mouseMove:mxUtils.bind(this,function(J,W){J=this.selectionCellsHandler.handlers.map;for(var Q in J)if(null!=J[Q].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(W.getEvent())){var S=this.tolerance;if(null!=E&&null!=f&&null!=d){if(Q=f,Math.abs(E.x-W.getGraphX())>S||Math.abs(E.y-W.getGraphY())>
-S){var ha=this.selectionCellsHandler.getHandler(Q.cell);null==ha&&this.model.isEdge(Q.cell)&&(ha=this.createHandler(Q));if(null!=ha&&null!=ha.bends&&0<ha.bends.length){J=ha.getHandleForEvent(d);var la=this.view.getEdgeStyle(Q);S=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(J=g);if(S&&0!=J&&J!=ha.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!S||null==Q.visibleSourceState&&null==Q.visibleTargetState||(this.graphHandler.reset(),W.consume());else if(J==mxEvent.LABEL_HANDLE||0==J||null!=Q.visibleSourceState||
-J==ha.bends.length-1||null!=Q.visibleTargetState)S||J==mxEvent.LABEL_HANDLE||(S=Q.absolutePoints,null!=S&&(null==la&&null==J||la==mxEdgeStyle.OrthConnector)&&(J=g,null==J&&(J=new mxRectangle(E.x,E.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,S[0].x,S[0].y)?J=0:mxUtils.contains(J,S[S.length-1].x,S[S.length-1].y)?J=ha.bends.length-1:null!=la&&(2==S.length||3==S.length&&(0==Math.round(S[0].x-S[1].x)&&0==Math.round(S[1].x-S[2].x)||0==Math.round(S[0].y-S[1].y)&&0==Math.round(S[1].y-
-S[2].y)))?J=2:(J=mxUtils.findNearestSegment(Q,E.x,E.y),J=null==la?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),ha.start(W.getGraphX(),W.getGraphX(),J),W.consume(),this.graphHandler.reset()}null!=ha&&(this.selectionCellsHandler.isHandlerActive(ha)?this.isCellSelected(Q.cell)||(this.selectionCellsHandler.handlers.put(Q.cell,ha),this.selectCellForEvent(Q.cell,W.getEvent())):this.isCellSelected(Q.cell)||ha.destroy());m=!1;E=d=f=g=null}}else if(Q=W.getState(),null!=Q&&this.isCellEditable(Q.cell)){ha=
-null;if(this.model.isEdge(Q.cell)){if(J=new mxRectangle(W.getGraphX(),W.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),S=Q.absolutePoints,null!=S)if(null!=Q.text&&null!=Q.text.boundingBox&&mxUtils.contains(Q.text.boundingBox,W.getGraphX(),W.getGraphY()))ha="move";else if(mxUtils.contains(J,S[0].x,S[0].y)||mxUtils.contains(J,S[S.length-1].x,S[S.length-1].y))ha="pointer";else if(null!=Q.visibleSourceState||null!=Q.visibleTargetState)J=this.view.getEdgeStyle(Q),ha="crosshair",J!=mxEdgeStyle.EntityRelation&&
-this.isOrthogonal(Q)&&(W=mxUtils.findNearestSegment(Q,W.getGraphX(),W.getGraphY()),W<S.length-1&&0<=W&&(ha=0==Math.round(S[W].x-S[W+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(W.getEvent())){S=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(W.getGraphX(),W.getGraphY());J.grow(S);if(this.isTableCell(Q.cell)&&(W=this.model.getParent(Q.cell),S=this.model.getParent(W),!this.isCellSelected(S)))if(mxUtils.intersects(J,new mxRectangle(Q.x,Q.y-2,Q.width,4))&&this.model.getChildAt(S,
-0)!=W||mxUtils.intersects(J,new mxRectangle(Q.x,Q.y+Q.height-2,Q.width,4)))ha="row-resize";else if(mxUtils.intersects(J,new mxRectangle(Q.x-2,Q.y,4,Q.height))&&this.model.getChildAt(W,0)!=Q.cell||mxUtils.intersects(J,new mxRectangle(Q.x+Q.width-2,Q.y,4,Q.height)))ha="col-resize";for(W=Q;null==ha&&null!=W&&(this.isTableCell(W.cell)||this.isTableRow(W.cell)||this.isTable(W.cell));)this.isSwimlane(W.cell)&&(S=this.getActualStartSize(W.cell),la=this.view.scale,(0<S.x||0<S.width)&&mxUtils.intersects(J,
-new mxRectangle(W.x+(S.x-S.width-1)*la+(0==S.x?W.width*la:0),W.y,1,W.height))?ha="col-resize":(0<S.y||0<S.height)&&mxUtils.intersects(J,new mxRectangle(W.x,W.y+(S.y-S.height-1)*la+(0==S.y?W.height:0),W.width,1))&&(ha="row-resize")),W=this.view.getState(this.model.getParent(W.cell))}null!=ha&&Q.setCursor(ha)}}}),mouseUp:mxUtils.bind(this,function(J,W){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var W=mxCellRenderer.prototype.getLabelValue.apply(this,
-arguments);J.view.graph.isHtmlLabel(J.cell)&&(W=1!=J.style.html?mxUtils.htmlEntities(W,!1):J.view.graph.sanitizeHtml(W));return W};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
-this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(J,W){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=q.apply(this,arguments);if(this.graph.pageVisible){var W=[],Q=this.graph.pageFormat,S=this.graph.pageScale,ha=Q.width*S;Q=Q.height*S;S=this.graph.view.translate;for(var la=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)W.push(new mxRectangle(((u.x+
-H)*ha+S.x)*la,(u.y*Q+S.y)*la,ha*la,Q*la));for(H=1;H<u.height;H++)W.push(new mxRectangle((u.x*ha+S.x)*la,((u.y+H)*Q+S.y)*la,ha*la,Q*la));J=W.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(J,W){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(J){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(J){for(var W=y.apply(this,arguments),Q=new mxDictionary,S=[],ha=0;ha<W.length;ha++){var la=this.graph.isTableCell(J)&&this.graph.isTableCell(W[ha])&&this.graph.isCellSelected(W[ha])?this.graph.model.getParent(W[ha]):this.graph.isTableRow(J)&&this.graph.isTableRow(W[ha])&&this.graph.isCellSelected(W[ha])?W[ha]:this.graph.getCompositeParent(W[ha]);null==la||Q.get(la)||(Q.put(la,!0),S.push(la))}return S};var F=this.graphHandler.start;
-this.graphHandler.start=function(J,W,Q,S){var ha=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?ha=!0:J=this.graph.model.getParent(J));ha||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,W){W=this.graph.getCompositeParent(W);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};
-var I=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;aa.apply(this,arguments);J!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ca=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<G||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(J){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var Z=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(J){return Z.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};
-var qa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(qa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=qa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(J){return mxEvent.isMouseEvent(J.getEvent())};var N=this.click;this.click=function(J){var W=null==J.state&&
-null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!W||J.isConsumed())return N.apply(this,arguments);var Q=W?J.sourceState.cell:J.getCell();null!=Q&&(Q=this.getClickableLinkForCell(Q),null!=Q&&(this.isCustomLink(Q)?this.customLinkClicked(Q):this.openLink(Q)));this.isEnabled()&&W&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};var Y=this.tooltipHandler.show;this.tooltipHandler.show=function(){Y.apply(this,arguments);if(null!=
-this.div)for(var J=this.div.getElementsByTagName("a"),W=0;W<J.length;W++)null!=J[W].getAttribute("href")&&null==J[W].getAttribute("target")&&J[W].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};this.getCursorForMouseEvent=function(J){var W=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);return this.getCursorForCell(W?J.sourceState.cell:J.getCell())};var ea=this.getCursorForCell;this.getCursorForCell=function(J){if(!this.isEnabled()||
-this.isCellLocked(J)){if(null!=this.getClickableLinkForCell(J))return"pointer";if(this.isCellLocked(J))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(J,W){var Q=mxEvent.isAltDown(W)?J:null;J=this.getCells(J.x,J.y,J.width,J.height,null,null,Q,function(S){return"1"==mxUtils.getValue(S.style,"locked","0")},!0);if(this.isToggleEvent(W))for(Q=0;Q<J.length;Q++)this.selectCellForEvent(J[Q],W);else this.selectCellsForEvent(J,W);return J};var ka=this.graphHandler.shouldRemoveCellsFromParent;
-this.graphHandler.shouldRemoveCellsFromParent=function(J,W,Q){return this.graph.isCellSelected(J)?!1:ka.apply(this,arguments)};this.isCellLocked=function(J){for(;null!=J;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(J),"locked","0"))return!0;J=this.model.getParent(J)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,W){"mouseDown"==W.getProperty("eventName")&&(J=W.getProperty("event").getState(),ja=null==J||this.isSelectionEmpty()||this.isCellSelected(J.cell)?
-null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(J,W){if(!mxEvent.isMultiTouchEvent(W)){J=W.getProperty("event");var Q=W.getProperty("cell");null==Q?(J=mxUtils.convertPoint(this.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),C.start(J.x,J.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(Q)&&this.removeSelectionCell(Q);ja=null;W.consume()}}));this.connectionHandler.selectCells=function(J,W){this.graph.setSelectionCell(W||
-J)};this.connectionHandler.constraintHandler.isStateIgnored=function(J,W){var Q=J.view.graph;return W&&(Q.isCellSelected(J.cell)||Q.isTableRow(J.cell)&&Q.selectionCellsHandler.isHandled(Q.model.getParent(J.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var J=this.connectionHandler.constraintHandler;null!=J.currentFocus&&J.isStateIgnored(J.currentFocus,!0)&&(J.currentFocus=null,J.constraints=null,J.destroyIcons());J.destroyFocusHighlight()}));Graph.touchStyle&&
-this.initTouch();var V=this.updateMouseEvent;this.updateMouseEvent=function(J){J=V.apply(this,arguments);null!=J.state&&this.isCellLocked(J.getCell())&&(J.state=null);return J}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
-Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
-Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,ea){if("mouseDown"==ea.getProperty("eventName")&&this.isEnabled()){L=ea.getProperty("event");var O=L.getState();ea=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),m=this.isCellSelected(O.cell),f=O,d=L,null!=O.text&&
+null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,L.getGraphX(),L.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var N=this.selectionCellsHandler.getHandler(O.cell);null!=N&&null!=N.bends&&0<N.bends.length&&(g=N.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(N=this.selectionCellsHandler.getHandler(O.cell),null==N||null==N.getHandleForEvent(L))){var ba=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),la=mxEvent.isTouchEvent(L.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=la+2;ba.grow(la);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,L.getGraphX()-N,L.getGraphY()-N)&&mxUtils.contains(O,L.getGraphX()-N,L.getGraphY()+N)&&mxUtils.contains(O,L.getGraphX()+N,L.getGraphY()+N)&&mxUtils.contains(O,L.getGraphX()+N,L.getGraphY()-N))){var u=this.model.getParent(O.cell);N=this.model.getParent(u);if(!this.isCellSelected(N)){la*=ea;var H=2*la;if(this.model.getChildAt(N,
+0)!=u&&mxUtils.intersects(ba,new mxRectangle(O.x,O.y-la,O.width,H))||this.model.getChildAt(u,0)!=O.cell&&mxUtils.intersects(ba,new mxRectangle(O.x-la,O.y,H,O.height))||mxUtils.intersects(ba,new mxRectangle(O.x,O.y+O.height-la,O.width,H))||mxUtils.intersects(ba,new mxRectangle(O.x+O.width-la,O.y,H,O.height)))u=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,L.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(la=N.getHandleForEvent(L),null!=la&&(N.start(L.getGraphX(),
+L.getGraphY(),la),N.blockDelayedSelection=!u,L.consume()))}}for(;!L.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(N=this.getActualStartSize(O.cell),(0<N.x||0<N.width)&&mxUtils.intersects(ba,new mxRectangle(O.x+(N.x-N.width-1)*ea+(0==N.x?O.width:0),O.y,1,O.height))||(0<N.y||0<N.height)&&mxUtils.intersects(ba,new mxRectangle(O.x,O.y+(N.y-N.height-1)*ea+(0==N.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,L.getEvent()),
+N=this.selectionCellsHandler.getHandler(O.cell),null!=N&&(la=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(L.getGraphX(),L.getGraphY(),la),L.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(L,ea){},mouseMove:mxUtils.bind(this,function(L,ea){L=this.selectionCellsHandler.handlers.map;for(var O in L)if(null!=L[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(ea.getEvent())){var N=this.tolerance;
+if(null!=E&&null!=f&&null!=d){if(O=f,Math.abs(E.x-ea.getGraphX())>N||Math.abs(E.y-ea.getGraphY())>N){var ba=this.selectionCellsHandler.getHandler(O.cell);null==ba&&this.model.isEdge(O.cell)&&(ba=this.createHandler(O));if(null!=ba&&null!=ba.bends&&0<ba.bends.length){L=ba.getHandleForEvent(d);var la=this.view.getEdgeStyle(O);N=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(L=g);if(N&&0!=L&&L!=ba.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!N||null==O.visibleSourceState&&null==O.visibleTargetState||
+(this.graphHandler.reset(),ea.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=O.visibleSourceState||L==ba.bends.length-1||null!=O.visibleTargetState)N||L==mxEvent.LABEL_HANDLE||(N=O.absolutePoints,null!=N&&(null==la&&null==L||la==mxEdgeStyle.OrthConnector)&&(L=g,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,N[0].x,N[0].y)?L=0:mxUtils.contains(L,N[N.length-1].x,N[N.length-1].y)?L=ba.bends.length-1:null!=la&&(2==N.length||3==N.length&&
+(0==Math.round(N[0].x-N[1].x)&&0==Math.round(N[1].x-N[2].x)||0==Math.round(N[0].y-N[1].y)&&0==Math.round(N[1].y-N[2].y)))?L=2:(L=mxUtils.findNearestSegment(O,E.x,E.y),L=null==la?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),ba.start(ea.getGraphX(),ea.getGraphX(),L),ea.consume(),this.graphHandler.reset()}null!=ba&&(this.selectionCellsHandler.isHandlerActive(ba)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,ba),this.selectCellForEvent(O.cell,ea.getEvent())):
+this.isCellSelected(O.cell)||ba.destroy());m=!1;E=d=f=g=null}}else if(O=ea.getState(),null!=O&&this.isCellEditable(O.cell)){ba=null;if(this.model.isEdge(O.cell)){if(L=new mxRectangle(ea.getGraphX(),ea.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),N=O.absolutePoints,null!=N)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,ea.getGraphX(),ea.getGraphY()))ba="move";else if(mxUtils.contains(L,N[0].x,N[0].y)||mxUtils.contains(L,N[N.length-1].x,N[N.length-
+1].y))ba="pointer";else if(null!=O.visibleSourceState||null!=O.visibleTargetState)L=this.view.getEdgeStyle(O),ba="crosshair",L!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(ea=mxUtils.findNearestSegment(O,ea.getGraphX(),ea.getGraphY()),ea<N.length-1&&0<=ea&&(ba=0==Math.round(N[ea].x-N[ea+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(ea.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(ea.getGraphX(),ea.getGraphY());L.grow(N);if(this.isTableCell(O.cell)&&
+(ea=this.model.getParent(O.cell),N=this.model.getParent(ea),!this.isCellSelected(N)))if(mxUtils.intersects(L,new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(N,0)!=ea||mxUtils.intersects(L,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))ba="row-resize";else if(mxUtils.intersects(L,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(ea,0)!=O.cell||mxUtils.intersects(L,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))ba="col-resize";for(ea=O;null==ba&&null!=ea&&(this.isTableCell(ea.cell)||
+this.isTableRow(ea.cell)||this.isTable(ea.cell));)this.isSwimlane(ea.cell)&&(N=this.getActualStartSize(ea.cell),la=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(L,new mxRectangle(ea.x+(N.x-N.width-1)*la+(0==N.x?ea.width*la:0),ea.y,1,ea.height))?ba="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(L,new mxRectangle(ea.x,ea.y+(N.y-N.height-1)*la+(0==N.y?ea.height:0),ea.width,1))&&(ba="row-resize")),ea=this.view.getState(this.model.getParent(ea.cell))}null!=ba&&O.setCursor(ba)}}}),mouseUp:mxUtils.bind(this,
+function(L,ea){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var ea=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(ea=1!=L.style.html?mxUtils.htmlEntities(ea,!1):L.view.graph.sanitizeHtml(ea));return ea};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
+this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(L,ea){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=q.apply(this,arguments);if(this.graph.pageVisible){var ea=[],O=this.graph.pageFormat,
+N=this.graph.pageScale,ba=O.width*N;O=O.height*N;N=this.graph.view.translate;for(var la=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)ea.push(new mxRectangle(((u.x+H)*ba+N.x)*la,(u.y*O+N.y)*la,ba*la,O*la));for(H=1;H<u.height;H++)ea.push(new mxRectangle((u.x*ba+N.x)*la,((u.y+H)*O+N.y)*la,ba*la,O*la));L=ea.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,ea){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};
+this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var ea=y.apply(this,arguments),O=new mxDictionary,N=[],ba=0;ba<ea.length;ba++){var la=this.graph.isTableCell(L)&&this.graph.isTableCell(ea[ba])&&this.graph.isCellSelected(ea[ba])?this.graph.model.getParent(ea[ba]):
+this.graph.isTableRow(L)&&this.graph.isTableRow(ea[ba])&&this.graph.isCellSelected(ea[ba])?ea[ba]:this.graph.getCompositeParent(ea[ba]);null==la||O.get(la)||(O.put(la,!0),N.push(la))}return N};var F=this.graphHandler.start;this.graphHandler.start=function(L,ea,O,N){var ba=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?ba=!0:L=this.graph.model.getParent(L));ba||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
+function(L,ea){ea=this.graph.getCompositeParent(ea);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;Z.apply(this,arguments);L!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ca=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
+function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(L){return aa.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(L){return Y.apply(this,
+arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var qa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(qa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
+qa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var Q=this.click;this.click=function(L){var ea=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!ea||L.isConsumed())return Q.apply(this,arguments);var O=ea?L.sourceState.cell:L.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&
+ea&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);if(null!=this.div)for(var L=this.div.getElementsByTagName("a"),ea=0;ea<L.length;ea++)null!=L[ea].getAttribute("href")&&null==L[ea].getAttribute("target")&&L[ea].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var ea=
+null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(ea?L.sourceState.cell:L.getCell())};var fa=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return fa.apply(this,arguments)};this.selectRegion=function(L,ea){var O=mxEvent.isAltDown(ea)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,O,function(N){return"1"==
+mxUtils.getValue(N.style,"locked","0")},!0);if(this.isToggleEvent(ea))for(O=0;O<L.length;O++)this.selectCellForEvent(L[O],ea);else this.selectCellsForEvent(L,ea);return L};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(L,ea,O){return this.graph.isCellSelected(L)?!1:ka.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};
+var ia=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,ea){"mouseDown"==ea.getProperty("eventName")&&(L=ea.getProperty("event").getState(),ia=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,ea){if(!mxEvent.isMultiTouchEvent(ea)){L=ea.getProperty("event");var O=ea.getProperty("cell");null==O?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),
+C.start(L.x,L.y)):null!=ia?this.addSelectionCells(ia):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);ia=null;ea.consume()}}));this.connectionHandler.selectCells=function(L,ea){this.graph.setSelectionCell(ea||L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,ea){var O=L.view.graph;return ea&&(O.isCellSelected(L.cell)||O.isTableRow(L.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var V=this.updateMouseEvent;this.updateMouseEvent=function(L){L=V.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};
+Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
+Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
+Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
Graph.createSvgImage=function(b,e,k,n,D){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=n&&null!=D?'viewBox="0 0 '+n+" "+D+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
@@ -2358,10 +2359,10 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(aa,ca){aa=String(aa);for(ca=ca||2;aa.length<ca;)aa="0"+aa;return aa};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Z,ca){Z=String(Z);for(ca=ca||2;Z.length<ca;)Z="0"+Z;return Z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var I=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(aa){return aa in G?G[aa]:aa.slice(1,
-aa.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(Z){return Z in G?G[Z]:Z.slice(1,
+Z.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
@@ -2375,11 +2376,11 @@ D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnect
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,y+m.y*k)).grow(40*k);t=null!=t?
-this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var aa=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;aa&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var ca=[],ba=C;C=F;D=mxUtils.bind(this,function(Z){if(null==E||null!=Z||null==C&&f){this.model.beginUpdate();try{if(null==ba&&aa){var qa=this.getAbsoluteParent(null!=Z?Z:b);qa=f?b:this.getCompositeParent(qa);ba=null!=Z?Z:this.duplicateCells([qa],
-!1)[0];null!=Z&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var N=this.getCellGeometry(ba);null!=N&&(null!=Z&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=N.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=N.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-N.width/2:m.x+N.width/2),N.x=m.x-N.width/2,N.y=m.y-N.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):aa&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var Y=mxEvent.isControlDown(n)&&
-mxEvent.isShiftDown(n)&&aa||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,ba,this.createCurrentEdgeStyle());if(null!=Y&&this.connectionHandler.insertBeforeSource){var ea=null;for(Z=b;null!=Z.parent&&null!=Z.geometry&&Z.geometry.relative&&Z.parent!=Y.parent;)Z=this.model.getParent(Z);null!=Z&&null!=Z.parent&&Z.parent==Y.parent&&(ea=Z.parent.getIndex(Z),this.model.add(Z.parent,Y,ea))}null==C&&null!=ba&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ea=b.parent.getIndex(b),this.model.add(b.parent,
-ba,ea));null!=Y&&ca.push(Y);null==C&&null!=ba&&ca.push(ba);null==ba&&null!=Y&&Y.geometry.setTerminalPoint(m,!1);null!=Y&&this.fireEvent(new mxEventObject("cellsInserted","cells",[Y]))}finally{this.model.endUpdate()}}if(null!=d)d(ca);else return ca});if(null==E||null!=ba||!aa||null==C&&f)return D(ba);E(g+m.x*k,y+m.y*k,D)};
+this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var Z=
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Z&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var ca=[],aa=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==aa&&Z){var qa=this.getAbsoluteParent(null!=Y?Y:b);qa=f?b:this.getCompositeParent(qa);aa=null!=Y?Y:this.duplicateCells([qa],
+!1)[0];null!=Y&&this.addCells([aa],this.model.getParent(b),null,null,null,!0);var Q=this.getCellGeometry(aa);null!=Q&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=Q.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=Q.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-Q.width/2:m.x+Q.width/2),Q.x=m.x-Q.width/2,Q.y=m.y-Q.height/2);null!=F?(this.addCells([aa],F,null,null,null,!0),C=null):Z&&!f&&this.addCells([aa],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
+mxEvent.isShiftDown(n)&&Z||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,aa,this.createCurrentEdgeStyle());if(null!=X&&this.connectionHandler.insertBeforeSource){var fa=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=X.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==X.parent&&(fa=Y.parent.getIndex(Y),this.model.add(Y.parent,X,fa))}null==C&&null!=aa&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(fa=b.parent.getIndex(b),this.model.add(b.parent,
+aa,fa));null!=X&&ca.push(X);null==C&&null!=aa&&ca.push(aa);null==aa&&null!=X&&X.geometry.setTerminalPoint(m,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(ca);else return ca});if(null==E||null!=aa||!Z||null==C&&f)return D(aa);E(g+m.x*k,y+m.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2457,22 +2458,22 @@ TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
m.length&&0<y){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),I=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,I));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
-k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(aa){E.setVisible(aa.cell,aa.actual.cell==aa.cell);if(aa.actual.cell!=aa.cell){if(aa.actual.row==aa.row){var ca=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo;aa.actual.geo.width+=ca.width}aa.actual.col==aa.col&&(ca=null!=aa.geo.alternateBounds?aa.geo.alternateBounds:aa.geo,aa.actual.geo.height+=ca.height)}}))}else for(q=
-0;q<m.length;q++)E.setVisible(m[q],!1)}finally{E.endUpdate()}}};
+k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Z){E.setVisible(Z.cell,Z.actual.cell==Z.cell);if(Z.actual.cell!=Z.cell){if(Z.actual.row==Z.row){var ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo;Z.actual.geo.width+=ca.width}Z.actual.col==Z.col&&(ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo,Z.actual.geo.height+=ca.height)}}))}else for(q=0;q<m.length;q++)E.setVisible(m[q],
+!1)}finally{E.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,V,J){var W=new mxPoint(V,J);W.type=ja;F.push(W);W=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==W||W.type!=
-ja||W.x!=V||W.y!=J},I=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],ca=q[G],ba=[],Z=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Z.x,Z.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Z,G++,Z=q[G+2];y=C(0,ca.x,ca.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var N=this.validEdges[qa],Y=N.absolutePoints;if(null!=Y&&mxUtils.intersects(m,N)&&"1"!=N.style.noJump)for(N=0;N<Y.length-1;N++){var ea=Y[N+1],ka=Y[N];for(Z=Y[N+2];N<Y.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Z.x,Z.y,
-ea.x,ea.y)<1*this.scale*this.scale;)ea=Z,N++,Z=Y[N+2];Z=mxUtils.intersection(ca.x,ca.y,aa.x,aa.y,ka.x,ka.y,ea.x,ea.y);if(null!=Z&&(Math.abs(Z.x-ca.x)>I||Math.abs(Z.y-ca.y)>I)&&(Math.abs(Z.x-aa.x)>I||Math.abs(Z.y-aa.y)>I)&&(Math.abs(Z.x-ka.x)>I||Math.abs(Z.y-ka.y)>I)&&(Math.abs(Z.x-ea.x)>I||Math.abs(Z.y-ea.y)>I)){ea=Z.x-ca.x;ka=Z.y-ca.y;Z={distSq:ea*ea+ka*ka,x:Z.x,y:Z.y};for(ea=0;ea<ba.length;ea++)if(ba[ea].distSq>Z.distSq){ba.splice(ea,0,Z);Z=null;break}null==Z||0!=ba.length&&ba[ba.length-1].x===
-Z.x&&ba[ba.length-1].y===Z.y||ba.push(Z)}}}for(N=0;N<ba.length;N++)y=C(1,ba[N].x,ba[N].y)||y}Z=q[q.length-1];y=C(0,Z.x,Z.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,ca=null,ba=[],Z=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var N=this.state.routedPoints[qa],Y=new mxPoint(N.x/this.scale,N.y/this.scale);0==qa?Y=q[0]:qa==this.state.routedPoints.length-1&&(Y=q[q.length-1]);var ea=!1;if(null!=aa&&1==N.type){var ka=this.state.routedPoints[qa+1];N=ka.x/this.scale-
-Y.x;ka=ka.y/this.scale-Y.y;N=N*N+ka*ka;null==Z&&(Z=new mxPoint(Y.x-aa.x,Y.y-aa.y),ca=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<ca?(Z.x=Z.x*C/ca,Z.y=Z.y*C/ca):Z=null);N>C*C&&0<ca&&(N=aa.x-Y.x,ka=aa.y-Y.y,N=N*N+ka*ka,N>C*C&&(ea=new mxPoint(Y.x-Z.x,Y.y-Z.y),N=new mxPoint(Y.x+Z.x,Y.y+Z.y),ba.push(ea),this.addPoints(m,ba,y,F,!1,null,G),ba=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(ea.x-Z.y*ba,ea.y+Z.x*ba),m.lineTo(N.x-Z.y*ba,N.y+Z.x*ba),m.lineTo(N.x,N.y)):"line"==I?(m.moveTo(ea.x+
-Z.y*ba,ea.y-Z.x*ba),m.lineTo(ea.x-Z.y*ba,ea.y+Z.x*ba),m.moveTo(N.x-Z.y*ba,N.y+Z.x*ba),m.lineTo(N.x+Z.y*ba,N.y-Z.x*ba),m.moveTo(N.x,N.y)):"arc"==I?(ba*=1.3,m.curveTo(ea.x-Z.y*ba,ea.y+Z.x*ba,N.x-Z.y*ba,N.y+Z.x*ba,N.x,N.y)):(m.moveTo(N.x,N.y),G=!0),ba=[N],ea=!0))}else Z=null;ea||(ba.push(Y),aa=Y)}this.addPoints(m,ba,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
-new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),aa=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
-G){var ca=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,ca,ba,aa)}ca=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ca+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ca);0!=G&&(ca=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,ca,ba,aa));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
-q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var aa=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,
-F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ia,V,L){var ea=new mxPoint(V,L);ea.type=ia;F.push(ea);ea=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==ea||ea.type!=
+ia||ea.x!=V||ea.y!=L},I=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Z=q[G+1],ca=q[G],aa=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Y.x,Y.y,Z.x,Z.y)<1*this.scale*this.scale;)Z=Y,G++,Y=q[G+2];y=C(0,ca.x,ca.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var Q=this.validEdges[qa],X=Q.absolutePoints;if(null!=X&&mxUtils.intersects(m,Q)&&"1"!=Q.style.noJump)for(Q=0;Q<X.length-1;Q++){var fa=X[Q+1],ka=X[Q];for(Y=X[Q+2];Q<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
+fa.x,fa.y)<1*this.scale*this.scale;)fa=Y,Q++,Y=X[Q+2];Y=mxUtils.intersection(ca.x,ca.y,Z.x,Z.y,ka.x,ka.y,fa.x,fa.y);if(null!=Y&&(Math.abs(Y.x-ca.x)>I||Math.abs(Y.y-ca.y)>I)&&(Math.abs(Y.x-Z.x)>I||Math.abs(Y.y-Z.y)>I)&&(Math.abs(Y.x-ka.x)>I||Math.abs(Y.y-ka.y)>I)&&(Math.abs(Y.x-fa.x)>I||Math.abs(Y.y-fa.y)>I)){fa=Y.x-ca.x;ka=Y.y-ca.y;Y={distSq:fa*fa+ka*ka,x:Y.x,y:Y.y};for(fa=0;fa<aa.length;fa++)if(aa[fa].distSq>Y.distSq){aa.splice(fa,0,Y);Y=null;break}null==Y||0!=aa.length&&aa[aa.length-1].x===Y.x&&
+aa[aa.length-1].y===Y.y||aa.push(Y)}}}for(Q=0;Q<aa.length;Q++)y=C(1,aa[Q].x,aa[Q].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Z=null,ca=null,aa=[],Y=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var Q=this.state.routedPoints[qa],X=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==qa?X=q[0]:qa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var fa=!1;if(null!=Z&&1==Q.type){var ka=this.state.routedPoints[qa+1];Q=ka.x/this.scale-
+X.x;ka=ka.y/this.scale-X.y;Q=Q*Q+ka*ka;null==Y&&(Y=new mxPoint(X.x-Z.x,X.y-Z.y),ca=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<ca?(Y.x=Y.x*C/ca,Y.y=Y.y*C/ca):Y=null);Q>C*C&&0<ca&&(Q=Z.x-X.x,ka=Z.y-X.y,Q=Q*Q+ka*ka,Q>C*C&&(fa=new mxPoint(X.x-Y.x,X.y-Y.y),Q=new mxPoint(X.x+Y.x,X.y+Y.y),aa.push(fa),this.addPoints(m,aa,y,F,!1,null,G),aa=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(fa.x-Y.y*aa,fa.y+Y.x*aa),m.lineTo(Q.x-Y.y*aa,Q.y+Y.x*aa),m.lineTo(Q.x,Q.y)):"line"==I?(m.moveTo(fa.x+
+Y.y*aa,fa.y-Y.x*aa),m.lineTo(fa.x-Y.y*aa,fa.y+Y.x*aa),m.moveTo(Q.x-Y.y*aa,Q.y+Y.x*aa),m.lineTo(Q.x+Y.y*aa,Q.y-Y.x*aa),m.moveTo(Q.x,Q.y)):"arc"==I?(aa*=1.3,m.curveTo(fa.x-Y.y*aa,fa.y+Y.x*aa,Q.x-Y.y*aa,Q.y+Y.x*aa,Q.x,Q.y)):(m.moveTo(Q.x,Q.y),G=!0),aa=[Q],fa=!0))}else Y=null;fa||(aa.push(X),Z=X)}this.addPoints(m,aa,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
+new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),Z=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
+G){var ca=Math.cos(-G),aa=Math.sin(-G);C=mxUtils.getRotatedPoint(C,ca,aa,Z)}ca=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ca+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ca);0!=G&&(ca=Math.cos(G),aa=Math.sin(G),C=mxUtils.getRotatedPoint(C,ca,aa,Z));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
+q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var Z=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Z<F)y=G,F=Z}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,F));
+return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
@@ -2481,146 +2482,146 @@ mxStencilRegistry.loadStencilSet=function(b,e,k,n){var D=mxStencilRegistry.packa
D.documentElement&&mxStencilRegistry.parseStencilSet(D.documentElement,e,t)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var n=b.firstChild;null!=n;)"shapes"==n.nodeName&&mxStencilRegistry.parseStencilSet(n,e,k),n=n.nextSibling;else{k=null!=k?k:!0;n=b.firstChild;var D="";b=b.getAttribute("name");for(null!=b&&(D=b+".");null!=n;){if(n.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=n.getAttribute("name"),null!=b)){D=D.toLowerCase();var t=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(D+t.toLowerCase(),new mxStencil(n));if(null!=e){var E=n.getAttribute("w"),
d=n.getAttribute("h");E=null==E?80:parseInt(E,10);d=null==d?80:parseInt(d,10);e(D,t,b,E,d)}}n=n.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,K){switch(K){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var n=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return n.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=t.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(M){var U=L.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<L.length;M++)null!=this.currentEdgeStyle[L[M]]&&(z+=L[M]+"="+this.currentEdgeStyle[L[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var K in this.graph.currentEdgeStyle)z.style[K]=this.graph.currentEdgeStyle[K];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=t.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),K=z.getCell;z.getCell=mxUtils.bind(this,function(M){var U=K.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<K.length;M++)null!=this.currentEdgeStyle[K[M]]&&(z+=K[M]+"="+this.currentEdgeStyle[K[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var M=0;M<z.length;M++){var U=z[M];L[mxObjectIdentity.get(U)]=U.getId();for(var X=this.model.getChildCount(U),
-fa=0;fa<X;fa++)this.createCellLookup([this.model.getChildAt(U,fa)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var U in z){var X=L[U];null==M[X]&&(M[X]=z[U].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,U){L=null!=L?L:0;M=null!=M?M:0;var X=new mxCodec(z.ownerDocument),fa=new mxGraphModel;X.decode(z,fa);z=[];X={};var na={},ua=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),X));if(null!=ua){var pa=this.createCellLookup([fa.root]);
-ua=ua.slice();this.model.beginUpdate();try{if(1!=ua.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<ua.length;fa++)za=this.model.getChildren(this.moveCells([ua[fa]],L,M,!1,this.model.getRoot())[0]),null!=za&&(z=z.concat(za));else{var za=fa.getChildren(ua[0]);null!=za&&(z=this.moveCells(za,L,M,!1,this.getDefaultParent()),na[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(X,pa,na),this.updateCustomLinks(na,z),U)){this.isGridEnabled()&&
-(L=this.snap(L),M=this.snap(M));var Da=this.getBoundingBoxFromGeometry(z,!0);null!=Da&&this.moveCells(z,L-Da.x,M-Da.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),U=new mxDictionary,X=0;X<z.length;X++)U.put(z[X],!0);var fa=new mxCodec,na=new mxGraphModel,ua=na.getChildAt(na.getRoot(),0);for(X=0;X<M.length;X++){na.add(ua,M[X]);var pa=this.view.getState(z[X]);if(null!=pa){var za=this.getCellGeometry(M[X]);null!=za&&za.relative&&
-!this.model.isEdge(z[X])&&null==U.get(this.model.getParent(z[X]))&&(za.offset=null,za.relative=!1,za.x=pa.x/pa.view.scale-pa.view.translate.x,za.y=pa.y/pa.view.scale-pa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return fa.encode(na)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==mxConstants.SHAPE_SWIMLANE||
-"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,U,X,fa,na,ua){null==ua&&(ua=this.model.getParent(z),this.isTable(ua)||this.isTableRow(ua))&&(ua=this.getCellAt(fa,na,null,!0,!1));M=null;this.model.beginUpdate();
-try{M=f.apply(this,[z,L,M,U,X,fa,na,ua]);this.model.setValue(M,"");var pa=this.getChildCells(M,!0);for(L=0;L<pa.length;L++){var za=this.getCellGeometry(pa[L]);null!=za&&za.relative&&0<za.x&&this.model.remove(pa[L])}var Da=this.getChildCells(z,!0);for(L=0;L<Da.length;L++)za=this.getCellGeometry(Da[L]),null!=za&&za.relative&&0>=za.x&&this.model.remove(Da[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,K){K=null!=K?K:{};for(var M=0;M<z.length;M++){var U=z[M];K[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
+ha=0;ha<W;ha++)this.createCellLookup([this.model.getChildAt(U,ha)],K)}return K};Graph.prototype.createCellMapping=function(z,K,M){M=null!=M?M:{};for(var U in z){var W=K[U];null==M[W]&&(M[W]=z[U].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,K,M,U){K=null!=K?K:0;M=null!=M?M:0;var W=new mxCodec(z.ownerDocument),ha=new mxGraphModel;W.decode(z,ha);z=[];W={};var na={},ua=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),W));if(null!=ua){var pa=this.createCellLookup([ha.root]);
+ua=ua.slice();this.model.beginUpdate();try{if(1!=ua.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<ua.length;ha++)za=this.model.getChildren(this.moveCells([ua[ha]],K,M,!1,this.model.getRoot())[0]),null!=za&&(z=z.concat(za));else{var za=ha.getChildren(ua[0]);null!=za&&(z=this.moveCells(za,K,M,!1,this.getDefaultParent()),na[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,pa,na),this.updateCustomLinks(na,z),U)){this.isGridEnabled()&&
+(K=this.snap(K),M=this.snap(M));var Da=this.getBoundingBoxFromGeometry(z,!0);null!=Da&&this.moveCells(z,K-Da.x,M-Da.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var K={},M=this.cloneCells(z,null,K),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ha=new mxCodec,na=new mxGraphModel,ua=na.getChildAt(na.getRoot(),0);for(W=0;W<M.length;W++){na.add(ua,M[W]);var pa=this.view.getState(z[W]);if(null!=pa){var za=this.getCellGeometry(M[W]);null!=za&&za.relative&&
+!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(za.offset=null,za.relative=!1,za.x=pa.x/pa.view.scale-pa.view.translate.x,za.y=pa.y/pa.view.scale-pa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(z)),M);return ha.encode(na)};Graph.prototype.isSwimlane=function(z,K){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,K)[mxConstants.STYLE_SHAPE]);return M==mxConstants.SHAPE_SWIMLANE||
+"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var K=this.model.getParent(z);if(null!=K){var M=this.getCurrentCellStyle(K);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,K,M,U,W,ha,na,ua){null==ua&&(ua=this.model.getParent(z),this.isTable(ua)||this.isTableRow(ua))&&(ua=this.getCellAt(ha,na,null,!0,!1));M=null;this.model.beginUpdate();
+try{M=f.apply(this,[z,K,M,U,W,ha,na,ua]);this.model.setValue(M,"");var pa=this.getChildCells(M,!0);for(K=0;K<pa.length;K++){var za=this.getCellGeometry(pa[K]);null!=za&&za.relative&&0<za.x&&this.model.remove(pa[K])}var Da=this.getChildCells(z,!0);for(K=0;K<Da.length;K++)za=this.getCellGeometry(Da[K]),null!=za&&za.relative&&0>=za.x&&this.model.remove(Da[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Ma=this.model.getTerminal(M,!1);if(null!=Ma){var La=this.getCurrentCellStyle(Ma);null!=La&&"1"==La.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,L,M){if(L||M)g.apply(this,arguments);else{var U=this.getSelectionCell(),X=null,fa=[],na=mxUtils.bind(this,function(ua){if(null!=this.view.getState(ua)&&(this.model.isVertex(ua)||this.model.isEdge(ua)))if(fa.push(ua),ua==U)X=fa.length-1;else if(z&&null==U&&0<fa.length||null!=X&&z&&fa.length>X||!z&&0<X)return;for(var pa=0;pa<this.model.getChildCount(ua);pa++)na(this.model.getChildAt(ua,pa))});na(this.model.root);0<fa.length&&(X=null!=X?mxUtils.mod(X+(z?1:-1),fa.length):0,this.setSelectionCell(fa[X]))}};
-Graph.prototype.swapShapes=function(z,L,M,U,X,fa,na){L=!1;if(!U&&null!=X&&1==z.length&&(U=this.view.getState(X),M=this.view.getState(z[0]),null!=U&&null!=M&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==U.style.shape&&"umlLifeline"==M.style.shape)&&(U=this.getCellGeometry(X),fa=this.getCellGeometry(z[0]),null!=U&&null!=fa))){L=U.clone();U=fa.clone();U.x=L.x;U.y=L.y;L.x=fa.x;L.y=fa.y;this.model.beginUpdate();try{this.model.setGeometry(X,L),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}L=
-!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,U,X,fa,na){if(this.swapShapes(z,L,M,U,X,fa,na))return z;na=null!=na?na:{};if(this.isTable(X)){for(var ua=[],pa=0;pa<z.length;pa++)this.isTable(z[pa])?ua=ua.concat(this.model.getChildCells(z[pa],!0).reverse()):ua.push(z[pa]);z=ua}this.model.beginUpdate();try{ua=[];for(pa=0;pa<z.length;pa++)if(null!=X&&this.isTableRow(z[pa])){var za=this.model.getParent(z[pa]),Da=this.getCellGeometry(z[pa]);this.isTable(za)&&ua.push(za);
-if(null!=za&&null!=Da&&this.isTable(za)&&this.isTable(X)&&(U||za!=X)){if(!U){var Ma=this.getCellGeometry(za);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Da.height,this.model.setGeometry(za,Ma))}Ma=this.getCellGeometry(X);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,this.model.setGeometry(X,Ma));var La=this.model.getChildCells(X,!0);if(0<La.length){z[pa]=U?this.cloneCell(z[pa]):z[pa];var Ua=this.model.getChildCells(z[pa],!0),Ra=this.model.getChildCells(La[0],!0),Fa=Ra.length-Ua.length;if(0<Fa)for(var va=
-0;va<Fa;va++){var ya=this.cloneCell(Ua[Ua.length-1]);null!=ya&&(ya.value="",this.model.add(z[pa],ya))}else if(0>Fa)for(va=0;va>Fa;va--)this.model.remove(Ua[Ua.length+va-1]);Ua=this.model.getChildCells(z[pa],!0);for(va=0;va<Ra.length;va++){var Na=this.getCellGeometry(Ra[va]),Ja=this.getCellGeometry(Ua[va]);null!=Na&&null!=Ja&&(Ja=Ja.clone(),Ja.width=Na.width,this.model.setGeometry(Ua[va],Ja))}}}}var Pa=m.apply(this,arguments);for(pa=0;pa<ua.length;pa++)!U&&this.model.contains(ua[pa])&&0==this.model.getChildCount(ua[pa])&&
-this.model.remove(ua[pa]);U&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Pa)}finally{this.model.endUpdate()}return Pa};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var X=this.model.getParent(z[U]),fa=this.model.getParent(X);1==this.model.getChildCount(X)&&1==this.model.getChildCount(fa)?0>mxUtils.indexOf(z,fa)&&0>mxUtils.indexOf(M,fa)&&M.push(fa):
-this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(fa=this.model.getParent(z[U]),0>mxUtils.indexOf(z,fa)&&0>mxUtils.indexOf(M,fa))){for(var na=this.model.getChildCells(fa,!0),ua=0,pa=0;pa<na.length;pa++)0<=mxUtils.indexOf(z,na[pa])&&ua++;ua==na.length&&M.push(fa)}M.push(z[U])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?M:new Graph;for(var U=0;U<L.length;U++)null!=L[U]&&M.updateCustomLinksForCell(z,L[U],M)};Graph.prototype.updateCustomLinksForCell=
-function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),U=0;U<M;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var M=JSON.parse(L);for(L=0;L<M.length;L++){var U=M[L];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
-U[3]:0,4<U.length?U[4]:0))}}catch(fa){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;L=z.shape.bounds;var X=z.shape.scale;M=L.width/X;L=L.height/X;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=M,M=L,L=U;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,U=0;U<L;U++){var X=this.model.getChildAt(z,U);this.model.isVertex(X)&&(X=this.getCellGeometry(X),null==X||X.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,L,M){for(var U=this.getCurrentCellStyle(z),X=!0,fa=!0,na=0;na<L.length&&fa;na++)X=X&&this.isTable(L[na]),fa=fa&&this.isTableRow(L[na]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||fa||X))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),U=[];M.beginUpdate();try{for(var X=0;X<z.length;X++){var fa=z[X];if(M.isEdge(fa)){var na=M.getTerminal(fa,!0),ua=M.getTerminal(fa,!1);M.setTerminal(fa,ua,!0);M.setTerminal(fa,na,!1);var pa=M.getGeometry(fa);if(null!=pa){pa=pa.clone();null!=pa.points&&pa.points.reverse();var za=pa.getTerminalPoint(!0),Da=pa.getTerminalPoint(!1);
-pa.setTerminalPoint(za,!1);pa.setTerminalPoint(Da,!0);M.setGeometry(fa,pa);var Ma=this.view.getState(fa),La=this.view.getState(na),Ua=this.view.getState(ua);if(null!=Ma){var Ra=null!=La?this.getConnectionConstraint(Ma,La,!0):null,Fa=null!=Ua?this.getConnectionConstraint(Ma,Ua,!1):null;this.setConnectionConstraint(fa,na,!0,Fa);this.setConnectionConstraint(fa,ua,!1,Ra);var va=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,va,[fa])}U.push(fa)}}else if(M.isVertex(fa)&&(pa=this.getCellGeometry(fa),null!=pa)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){pa=pa.clone();pa.x+=pa.width/2-pa.height/2;pa.y+=pa.height/2-pa.width/2;var ya=pa.width;pa.width=pa.height;pa.height=ya;M.setGeometry(fa,pa)}var Na=this.view.getState(fa);if(null!=Na){var Ja=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Pa=mxUtils.getValue(Na.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ja[mxUtils.mod(mxUtils.indexOf(Ja,Pa)+(L?-1:1),Ja.length)],[fa])}U.push(fa)}}}finally{M.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var M=this.view.getState(L);null!=M&&null!=M.shape&&(this.view.invalidate(L),M.shape.bounds=null)}y.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var M=this.view.getState(z[L]);null!=M&&null!=M.shape&&null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};
-Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
-X=0;X<z.length;X++)if(this.isHtmlLabel(z[X])){var fa=this.convertValueToString(z[X]);if(null!=fa&&0<fa.length){U.innerHTML=fa;for(var na=U.getElementsByTagName(null!=M?M:"*"),ua=0;ua<na.length;ua++)L(na[ua]);U.innerHTML!=fa&&this.cellLabelChanged(z[X],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
-X=z;null!=X;){if(X==this.model.getRoot()||null!=X.value&&"object"==typeof X.value&&X.hasAttribute(U)){this.setAttributeForCell(X,U,L);break}X=this.model.getParent(X)}var fa=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+Graph.diagramLanguage,L):fa.setAttribute("label",L);L=fa}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var U=[];for(M=0;M<z.length;M++){var X=this.model.getParent(z[M]);null==X||L.get(X)||(L.put(X,!0),U.push(X))}for(M=0;M<U.length;M++)if(X=this.view.getState(U[M]),null!=X&&(this.model.isEdge(X.cell)||this.model.isVertex(X.cell))&&this.isCellDeletable(X.cell)&&this.isTransparentState(X)){for(var fa=!0,na=0;na<this.model.getChildCount(X.cell)&&fa;na++)L.get(this.model.getChildAt(X.cell,na))||(fa=!1);fa&&z.push(X.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,L)};Graph.prototype.getAttributeForCell=function(z,L,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,L,M){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=M?U.setAttribute(L,M):U.removeAttribute(L);
-this.model.setValue(z,U)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,U){this.getModel();if(mxEvent.isAltDown(L))return null;for(var X=0;X<z.length;X++){var fa=this.model.getParent(z[X]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(z,fa))return null}fa=F.apply(this,arguments);var na=!0;for(X=0;X<z.length&&na;X++)na=na&&this.isTableRow(z[X]);na&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)||
-(fa=null));return fa};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,z,L))};Graph.prototype.insertTextForEvent=function(z,L){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var U=this.model.isEdge(L)?this.view.getState(L):
-null,X=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=X||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&X==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,U))}return L};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),X=this.getPageSize();L=Math.max(L,U.x*X.width);M=Math.max(M,U.y*X.height)}return new mxPoint(this.snap(L+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),M=this.getInsertPoint(),U=this.snap(Math.round(Math.max(M.x,
-L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,L,M){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-U.geometry.relative=!0;U.connectable=!1;var X=this.view.getRelativePoint(M,z,L);U.geometry.x=Math.round(1E4*X.x)/1E4;U.geometry.y=Math.round(X.y);U.geometry.offset=new mxPoint(0,0);X=this.view.getPoint(M,U.geometry);var fa=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-X.x)/fa),Math.round((L-X.y)/fa))}else X=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
-X.x-(null!=M?M.origin.x:0),U.geometry.y=Math.round(L/this.view.scale)-X.y-(null!=M?M.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,L,M){var U=mxUtils.bind(this,function(){var pa=this.container.getElementsByTagName("a");if(null!=pa)for(var za=0;za<pa.length;za++){var Da=
-this.getAbsoluteUrl(pa[za].getAttribute("href"));null!=Da&&(pa[za].setAttribute("rel",this.linkRelation),pa[za].setAttribute("href",Da),null!=L&&mxEvent.addGestureListeners(pa[za],null,null,L))}});this.model.addListener(mxEvent.CHANGE,U);U();var X=this.container.style.cursor,fa=this.getTolerance(),na=this,ua={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(pa){var za=
+function(z,K,M){if(K||M)g.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ha=[],na=mxUtils.bind(this,function(ua){if(null!=this.view.getState(ua)&&(this.model.isVertex(ua)||this.model.isEdge(ua)))if(ha.push(ua),ua==U)W=ha.length-1;else if(z&&null==U&&0<ha.length||null!=W&&z&&ha.length>W||!z&&0<W)return;for(var pa=0;pa<this.model.getChildCount(ua);pa++)na(this.model.getChildAt(ua,pa))});na(this.model.root);0<ha.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ha.length):0,this.setSelectionCell(ha[W]))}};
+Graph.prototype.swapShapes=function(z,K,M,U,W,ha,na){K=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),M=this.view.getState(z[0]),null!=U&&null!=M&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==U.style.shape&&"umlLifeline"==M.style.shape)&&(U=this.getCellGeometry(W),ha=this.getCellGeometry(z[0]),null!=U&&null!=ha))){K=U.clone();U=ha.clone();U.x=K.x;U.y=K.y;K.x=ha.x;K.y=ha.y;this.model.beginUpdate();try{this.model.setGeometry(W,K),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}K=
+!0}return K};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,K,M,U,W,ha,na){if(this.swapShapes(z,K,M,U,W,ha,na))return z;na=null!=na?na:{};if(this.isTable(W)){for(var ua=[],pa=0;pa<z.length;pa++)this.isTable(z[pa])?ua=ua.concat(this.model.getChildCells(z[pa],!0).reverse()):ua.push(z[pa]);z=ua}this.model.beginUpdate();try{ua=[];for(pa=0;pa<z.length;pa++)if(null!=W&&this.isTableRow(z[pa])){var za=this.model.getParent(z[pa]),Da=this.getCellGeometry(z[pa]);this.isTable(za)&&ua.push(za);
+if(null!=za&&null!=Da&&this.isTable(za)&&this.isTable(W)&&(U||za!=W)){if(!U){var Ma=this.getCellGeometry(za);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Da.height,this.model.setGeometry(za,Ma))}Ma=this.getCellGeometry(W);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,this.model.setGeometry(W,Ma));var La=this.model.getChildCells(W,!0);if(0<La.length){z[pa]=U?this.cloneCell(z[pa]):z[pa];var Ua=this.model.getChildCells(z[pa],!0),Sa=this.model.getChildCells(La[0],!0),Fa=Sa.length-Ua.length;if(0<Fa)for(var va=
+0;va<Fa;va++){var ya=this.cloneCell(Ua[Ua.length-1]);null!=ya&&(ya.value="",this.model.add(z[pa],ya))}else if(0>Fa)for(va=0;va>Fa;va--)this.model.remove(Ua[Ua.length+va-1]);Ua=this.model.getChildCells(z[pa],!0);for(va=0;va<Sa.length;va++){var Na=this.getCellGeometry(Sa[va]),Ja=this.getCellGeometry(Ua[va]);null!=Na&&null!=Ja&&(Ja=Ja.clone(),Ja.width=Na.width,this.model.setGeometry(Ua[va],Ja))}}}}var Qa=m.apply(this,arguments);for(pa=0;pa<ua.length;pa++)!U&&this.model.contains(ua[pa])&&0==this.model.getChildCount(ua[pa])&&
+this.model.remove(ua[pa]);U&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Qa)}finally{this.model.endUpdate()}return Qa};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,K){var M=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ha=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(M,ha)&&M.push(ha):
+this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ha=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(M,ha))){for(var na=this.model.getChildCells(ha,!0),ua=0,pa=0;pa<na.length;pa++)0<=mxUtils.indexOf(z,na[pa])&&ua++;ua==na.length&&M.push(ha)}M.push(z[U])}M=q.apply(this,[M,K])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,K,M){M=null!=M?M:new Graph;for(var U=0;U<K.length;U++)null!=K[U]&&M.updateCustomLinksForCell(z,K[U],M)};Graph.prototype.updateCustomLinksForCell=
+function(z,K){this.doUpdateCustomLinksForCell(z,K);for(var M=this.model.getChildCount(K),U=0;U<M;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(K,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,K){};Graph.prototype.getAllConnectionConstraints=function(z,K){if(null!=z){K=mxUtils.getValue(z.style,"points",null);if(null!=K){z=[];try{var M=JSON.parse(K);for(K=0;K<M.length;K++){var U=M[K];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
+U[3]:0,4<U.length?U[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;K=z.shape.bounds;var W=z.shape.scale;M=K.width/W;K=K.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=M,M=K,K=U;K=z.shape.getConstraints(z.style,M,K);if(null!=K)return K;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
+z){var K=this.getCurrentCellStyle(z);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[z])}};Graph.prototype.isValidRoot=function(z){for(var K=this.model.getChildCount(z),M=0,U=0;U<K;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=
+function(z,K,M){for(var U=this.getCurrentCellStyle(z),W=!0,ha=!0,na=0;na<K.length&&ha;na++)W=W&&this.isTable(K[na]),ha=ha&&this.isTableRow(K[na]);return(1==K.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||W))&&!this.isCellLocked(z)};
+Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(z){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(z,K){var M=this.getModel(),U=[];M.beginUpdate();try{for(var W=0;W<z.length;W++){var ha=z[W];if(M.isEdge(ha)){var na=M.getTerminal(ha,!0),ua=M.getTerminal(ha,!1);M.setTerminal(ha,ua,!0);M.setTerminal(ha,na,!1);var pa=M.getGeometry(ha);if(null!=pa){pa=pa.clone();null!=pa.points&&pa.points.reverse();var za=pa.getTerminalPoint(!0),Da=pa.getTerminalPoint(!1);
+pa.setTerminalPoint(za,!1);pa.setTerminalPoint(Da,!0);M.setGeometry(ha,pa);var Ma=this.view.getState(ha),La=this.view.getState(na),Ua=this.view.getState(ua);if(null!=Ma){var Sa=null!=La?this.getConnectionConstraint(Ma,La,!0):null,Fa=null!=Ua?this.getConnectionConstraint(Ma,Ua,!1):null;this.setConnectionConstraint(ha,na,!0,Fa);this.setConnectionConstraint(ha,ua,!1,Sa);var va=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,va,[ha])}U.push(ha)}}else if(M.isVertex(ha)&&(pa=this.getCellGeometry(ha),null!=pa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){pa=pa.clone();pa.x+=pa.width/2-pa.height/2;pa.y+=pa.height/2-pa.width/2;var ya=pa.width;pa.width=pa.height;pa.height=ya;M.setGeometry(ha,pa)}var Na=this.view.getState(ha);if(null!=Na){var Ja=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ja[mxUtils.mod(mxUtils.indexOf(Ja,Qa)+(K?-1:1),Ja.length)],[ha])}U.push(ha)}}}finally{M.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
+z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var K=z.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var M=this.view.getState(K);null!=M&&null!=M.shape&&(this.view.invalidate(K),M.shape.bounds=null)}y.apply(this,arguments);
+z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var K=0;K<z.length;K++){var M=this.view.getState(z[K]);null!=M&&null!=M.shape&&null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[K]):this.isReplacePlaceholders(z[K])&&this.view.invalidate(z[K],!1,!1)}};
+Graph.prototype.replaceElement=function(z,K){K=z.ownerDocument.createElement(null!=K?K:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=z.innerHTML;z.parentNode.replaceChild(K,z)};Graph.prototype.processElements=function(z,K){if(null!=z){z=z.getElementsByTagName("*");for(var M=0;M<z.length;M++)K(z[M])}};Graph.prototype.updateLabelElements=function(z,K,M){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
+W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ha=this.convertValueToString(z[W]);if(null!=ha&&0<ha.length){U.innerHTML=ha;for(var na=U.getElementsByTagName(null!=M?M:"*"),ua=0;ua<na.length;ua++)K(na[ua]);U.innerHTML!=ha&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,K,M){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
+W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,K);break}W=this.model.getParent(W)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+Graph.diagramLanguage,K):ha.setAttribute("label",K);K=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
+z){for(var K=new mxDictionary,M=0;M<z.length;M++)K.put(z[M],!0);var U=[];for(M=0;M<z.length;M++){var W=this.model.getParent(z[M]);null==W||K.get(W)||(K.put(W,!0),U.push(W))}for(M=0;M<U.length;M++)if(W=this.view.getState(U[M]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ha=!0,na=0;na<this.model.getChildCount(W.cell)&&ha;na++)K.get(this.model.getChildAt(W.cell,na))||(ha=!1);ha&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var K=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&K.push(z[M]);z=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,K){this.setAttributeForCell(z,"link",K)};Graph.prototype.setTooltipForCell=function(z,K){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,K)};Graph.prototype.getAttributeForCell=function(z,K,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(K):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,K,M){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=M?U.setAttribute(K,M):U.removeAttribute(K);
+this.model.setValue(z,U)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,K,M,U){this.getModel();if(mxEvent.isAltDown(K))return null;for(var W=0;W<z.length;W++){var ha=this.model.getParent(z[W]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=F.apply(this,arguments);var na=!0;for(W=0;W<z.length&&na;W++)na=na&&this.isTableRow(z[W]);na&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)||
+(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,K){this.isEnabled()&&(K=this.insertTextForEvent(z,K),mxGraph.prototype.dblClick.call(this,z,K))};Graph.prototype.insertTextForEvent=function(z,K){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(K)){var U=this.model.isEdge(K)?this.view.getState(K):
+null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(M.x,M.y))),K=this.addText(M.x,M.y,U))}return K};
+Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();K=Math.max(K,U.x*W.width);M=Math.max(M,U.y*W.height)}return new mxPoint(this.snap(K+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,K=this.getGraphBounds(),M=this.getInsertPoint(),U=this.snap(Math.round(Math.max(M.x,
+K.x/z.scale-z.translate.x+(0==K.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(K.y+K.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,K,M){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(M,z,K);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(M,U.geometry);var ha=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ha),Math.round((K-W.y)/ha))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
+W.x-(null!=M?M.origin.x:0),U.geometry.y=Math.round(K/this.view.scale)-W.y-(null!=M?M.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,K,M){var U=mxUtils.bind(this,function(){var pa=this.container.getElementsByTagName("a");if(null!=pa)for(var za=0;za<pa.length;za++){var Da=
+this.getAbsoluteUrl(pa[za].getAttribute("href"));null!=Da&&(pa[za].setAttribute("rel",this.linkRelation),pa[za].setAttribute("href",Da),null!=K&&mxEvent.addGestureListeners(pa[za],null,null,K))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ha=this.getTolerance(),na=this,ua={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(pa){var za=
pa.sourceState;if(null==za||null==na.getLinkForCell(za.cell))pa=na.getCellAt(pa.getGraphX(),pa.getGraphY(),null,null,null,function(Da,Ma,La){return null==na.getLinkForCell(Da.cell)}),za=null==za||na.model.isAncestor(pa,za.cell)?na.view.getState(pa):null;za!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=za,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(pa,za){this.startX=za.getGraphX();this.startY=za.getGraphY();this.scrollLeft=na.container.scrollLeft;
-this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(za)},mouseMove:function(pa,za){if(na.isMouseDown)null!=this.currentLink&&(pa=Math.abs(this.startX-za.getGraphX()),za=Math.abs(this.startY-za.getGraphY()),(pa>fa||za>fa)&&this.clear());else{for(pa=za.getSource();null!=pa&&"a"!=pa.nodeName.toLowerCase();)pa=pa.parentNode;null!=pa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&na.tooltipHandler.reset(za,!0,this.currentState),(null==this.currentState||za.getState()!=this.currentState&&null!=za.sourceState||!na.intersects(this.currentState,za.getGraphX(),za.getGraphY()))&&this.updateCurrentState(za))}},mouseUp:function(pa,za){var Da=za.getSource();for(pa=za.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<fa&&Math.abs(this.scrollTop-na.container.scrollTop)<fa&&(null==za.sourceState||
-!za.isSource(za.sourceState.control))&&((mxEvent.isLeftMouseButton(pa)||mxEvent.isMiddleMouseButton(pa))&&!mxEvent.isPopupTrigger(pa)||mxEvent.isTouchEvent(pa))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==L||L(pa,this.currentLink),mxEvent.isConsumed(pa)||(pa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(pa)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,pa),za.consume())):null!=M&&!za.isConsumed()&&
-Math.abs(this.scrollLeft-na.container.scrollLeft)<fa&&Math.abs(this.scrollTop-na.container.scrollTop)<fa&&Math.abs(this.startX-za.getGraphX())<fa&&Math.abs(this.startY-za.getGraphY())<fa&&M(za.getEvent()));this.clear()},activate:function(pa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(pa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(pa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(pa))},clear:function(){null!=na.container&&
-(na.container.style.cursor=X);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(pa){};na.addMouseListener(ua);mxEvent.addListener(document,"mouseleave",function(pa){ua.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);
-var U=this.getModel(),X=this.gridSize,fa=[];U.beginUpdate();try{var na={},ua=this.createCellLookup(z),pa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var za=U.getParent(z[M]);if(null!=za){var Da=this.moveCells([pa[M]],X,X,!1)[0];fa.push(Da);if(L)U.add(za,pa[M]);else{var Ma=za.getIndex(z[M]);U.add(za,pa[M],Ma+1)}if(this.isTable(za)){var La=this.getCellGeometry(pa[M]),Ua=this.getCellGeometry(za);null!=La&&null!=Ua&&(Ua=Ua.clone(),Ua.height+=La.height,U.setGeometry(za,Ua))}}else fa.push(pa[M])}this.updateCustomLinks(this.createCellMapping(na,
-ua),pa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",pa))}finally{U.endUpdate()}return fa};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),X=[],fa=0;fa<U.length;fa++)X.push(U[fa]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==X.length+1)for(fa=z.length-1;0<=fa;fa--)if(0==fa||z[fa]!=X[fa-1]){z[fa].setAttribute("width",
-L);z[fa].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],U=0;U<L.length;U++)M.push(L[U]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(U=L.length-1;0<=U;U--)if(L[U]!=M[U-1]){for(L=L[U].getElementsByTagName("a");0<L.length;){for(M=
-L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==
-L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],U=null,X=null,fa=0;fa<L.length;fa++)if(this.getModel().isVertex(L[fa])){var na=this.view.getState(L[fa]);if(null!=na){var ua=z?na.getCenterX():na.getCenterY();U=null!=U?Math.max(U,ua):ua;X=null!=X?Math.min(X,ua):ua;M.push(na)}}if(2<M.length){M.sort(function(Ma,La){return z?Ma.x-La.x:Ma.y-La.y});na=this.view.translate;ua=this.view.scale;X=X/ua-(z?na.x:na.y);U=U/ua-(z?na.x:na.y);this.getModel().beginUpdate();try{var pa=(U-X)/(M.length-
-1);U=X;for(fa=1;fa<M.length-1;fa++){var za=this.view.getState(this.model.getParent(M[fa].cell)),Da=this.getCellGeometry(M[fa].cell);U+=pa;null!=Da&&null!=za&&(Da=Da.clone(),z?Da.x=Math.round(U-Da.width/2)-za.origin.x:Da.y=Math.round(U-Da.height/2)-za.origin.y,this.getModel().setGeometry(M[fa].cell,Da))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,U,X,fa,na,ua,pa,za,Da,Ma,La,Ua){var Ra=null;if(null!=Ua)for(Ra=new mxDictionary,Da=0;Da<Ua.length;Da++)Ra.put(Ua[Da],
-!0);if(Ua=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;X=null!=X?X:!0;fa=null!=fa?fa:!0;na=null!=na?na:!0;za=null!=za?za:!1;var Fa="page"==La?this.view.getBackgroundPageBounds():fa&&null==Ra||U||"diagram"==La?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),va=this.view.scale;"diagram"==La&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-va,(this.view.translate.y+this.backgroundImage.y)*va,this.backgroundImage.width*va,this.backgroundImage.height*va)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));U=L/va;La=X?-.5:0;var ya=Graph.createSvgNode(La,La,Math.max(1,Math.ceil(Fa.width*U)+2*M)+(za&&0==M?5:0),Math.max(1,Math.ceil(Fa.height*U)+2*M)+(za&&0==M?5:0),z),Na=ya.ownerDocument,Ja=null!=Na.createElementNS?Na.createElementNS(mxConstants.NS_SVG,"g"):Na.createElement("g");ya.appendChild(Ja);var Pa=this.createSvgCanvas(Ja);Pa.foOffset=
-X?-.5:0;Pa.textOffset=X?-.5:0;Pa.imageOffset=X?-.5:0;Pa.translate(Math.floor(M/L-Fa.x/va),Math.floor(M/L-Fa.y/va));var Ya=document.createElement("div"),cb=Pa.getAlternateText;Pa.getAlternateText=function(db,kb,ib,nb,vb,mb,Bb,yb,lb,ob,gb,rb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(Ya.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(Ya.childNodes));for(var zb=Math.ceil(2*nb/this.state.fontSize),wb=[],Ab=0,pb=0;(0==zb||Ab<zb)&&pb<mb.length;){var xb=mb.charCodeAt(pb);
-if(10==xb||13==xb){if(0<Ab)break}else wb.push(mb.charAt(pb)),255>xb&&Ab++;pb++}wb.length<mb.length&&1<mb.length-wb.length&&(mb=mxUtils.trim(wb.join(""))+"...");return mb}catch(c){return cb.apply(this,arguments)}else return cb.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=va/L;var qb=this.view.translate;La=new mxRectangle((fb.x+qb.x)*z,(fb.y+qb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Fa,La)&&Pa.image(fb.x+qb.x,fb.y+qb.y,fb.width,fb.height,fb.src,!0)}Pa.scale(U);Pa.textEnabled=
-na;ua=null!=ua?ua:this.createSvgImageExport();var ub=ua.drawCellState,ab=ua.getLinkForCellState;ua.getLinkForCellState=function(db,kb){var ib=ab.apply(this,arguments);return null==ib||db.view.graph.isCustomLink(ib)?null:ib};ua.getLinkTargetForCellState=function(db,kb){return db.view.graph.getLinkTargetForCell(db.cell)};ua.drawCellState=function(db,kb){for(var ib=db.view.graph,nb=null!=Ra?Ra.get(db.cell):ib.isCellSelected(db.cell),vb=ib.model.getParent(db.cell);!(fa&&null==Ra||nb)&&null!=vb;)nb=null!=
-Ra?Ra.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(fa&&null==Ra||nb)&&ub.apply(this,arguments)};ua.drawState(this.getView().getState(this.model.root),Pa);this.updateSvgLinks(ya,pa,!0);this.addForeignObjectWarning(Pa,ya);return ya}finally{Ua&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),U=z.createElement("g");
-U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var X=z.createElement("a");X.setAttribute("transform","translate(0,-5)");null==X.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(X.setAttribute("xlink:href",Graph.foreignObjectWarningLink),X.setAttribute("target","_blank")):(X.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),X.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");
-z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(U);X.appendChild(z);M.appendChild(X);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var X=z[U].getAttribute("href");null==X&&(X=z[U].getAttribute("xlink:href"));null!=X&&(null!=L&&/^https?:\/\//.test(X)?
-z[U].setAttribute("target",L):M&&this.isCustomLink(X)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());
-return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=
-function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,
-L,M){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var X=0;X<U.points.length;X++)L?U.points[X].x=M+(M-U.points[X].x):U.points[X].y=M+(M-U.points[X].y);X=function(fa){null!=fa&&(L?fa.x=M+(M-fa.x):fa.y=M+(M-fa.y))};X(U.getTerminalPoint(!0));X(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),X=0;X<U;X++){var fa=this.model.getChildAt(z,X);if(this.model.isEdge(fa))this.flipEdgePoints(fa,
-L,M);else{var na=this.getCellGeometry(fa);null!=na&&(na=na.clone(),L?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(fa,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var X=this.view.getState(z[U]);null!=X&&this.flipEdgePoints(z[U],L,(L?X.getCenterX():X.getCenterY())/this.view.scale-(L?X.origin.x:X.origin.y)-(L?this.view.translate.x:
-this.view.translate.y))}else{var fa=this.getCellGeometry(z[U]);null!=fa&&this.flipChildren(z[U],L,L?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);M.push(z[U])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var X=this.model.getParent(z[U]);if(this.isTable(X)){var fa=this.getCellGeometry(z[U]),na=this.getCellGeometry(X);
-null!=fa&&null!=na&&(na=na.clone(),na.height-=fa.height,this.model.setGeometry(X,na))}}var ua=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=ua)for(M=[],U=0;U<ua.length;U++)this.model.contains(ua[U])&&(this.model.isVertex(ua[U])||this.model.isEdge(ua[U]))&&M.push(ua[U])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var U=z,X=0;if(this.isTableCell(z)){var fa=M.getParent(z);
-U=M.getParent(fa);X=mxUtils.indexOf(M.getChildCells(fa,!0),z)}else this.isTableRow(z)?U=M.getParent(z):z=M.getChildCells(U,!0)[0],L||(X=M.getChildCells(z,!0).length-1);var na=M.getChildCells(U,!0),ua=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var pa=M.getChildCells(na[z],!0)[X],za=M.cloneCell(pa,!1),Da=this.getCellGeometry(za);za.value=null;za.style=mxUtils.setStyle(mxUtils.setStyle(za.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
-Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ua=Da.width;var Ma=this.getCellGeometry(na[z]);null!=Ma&&(Da.height=Ma.height)}M.add(na[z],za,X+(L?0:1))}var La=this.getCellGeometry(U);null!=La&&(La=La.clone(),La.width+=ua,M.setGeometry(U,La))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var U=L.getChildCells(M,!0);0==U.length?L.remove(M):(M==
-z&&(z=U[U.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var X=M.getChildCells(U,!0);z=X[L?0:X.length-1]}else U=M.getParent(z);var fa=U.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(U,z,fa+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var U=z,X=z;if(this.isTableCell(z))X=
-M.getParent(z),U=M.getParent(X);else if(this.isTableRow(z))U=M.getParent(z);else{var fa=M.getChildCells(U,!0);X=fa[L?0:fa.length-1]}var na=M.getChildCells(X,!0),ua=U.getIndex(X);X=M.cloneCell(X,!1);X.value=null;var pa=this.getCellGeometry(X);if(null!=pa){for(fa=0;fa<na.length;fa++){z=M.cloneCell(na[fa],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var za=this.getCellGeometry(z);null!=za&&(null!=za.alternateBounds&&(za.width=za.alternateBounds.width,
-za.height=za.alternateBounds.height,za.alternateBounds=null),za.height=pa.height);X.insert(z)}M.add(U,X,ua+(L?0:1));var Da=this.getCellGeometry(U);null!=Da&&(Da=Da.clone(),Da.height+=pa.height,M.setGeometry(U,Da))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,U=z;this.isTableCell(z)&&(U=L.getParent(z));this.isTableRow(U)&&(M=L.getParent(U));var X=L.getChildCells(M,!0);if(0==X.length)L.remove(M);else{this.isTableRow(U)||(U=
-X[0]);var fa=L.getChildCells(U,!0);if(1>=fa.length)L.remove(M);else{var na=fa.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(fa,z));for(U=z=0;U<X.length;U++){var ua=L.getChildCells(X[U],!0)[na];L.remove(ua);var pa=this.getCellGeometry(ua);null!=pa&&(z=Math.max(z,pa.width))}var za=this.getCellGeometry(M);null!=za&&(za=za.clone(),za.width-=z,L.setGeometry(M,za))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,U=z;this.isTableCell(z)&&
-(z=U=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(U));var X=L.getChildCells(M,!0);if(1>=X.length)L.remove(M);else{this.isTableRow(U)||(U=X[X.length-1]);L.remove(U);z=0;var fa=this.getCellGeometry(U);null!=fa&&(z=fa.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,L.setGeometry(M,na))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],U=M.rows[0].cells,X=z=0;X<U.length;X++){var fa=U[X].getAttribute("colspan");z+=null!=fa?parseInt(fa):
-1}L=M.insertRow(L);for(X=0;X<z;X++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var U=0;U<M.rows.length;U++){var X=document.createElement("th");M.rows[U].appendChild(X);mxUtils.br(X)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)U=z.rows[M].insertCell(L),mxUtils.br(U);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,
-L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var U;U=M.firstChild;)lastNode=z.appendChild(U);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=
-function(z,L){function M(X,fa){X.length>fa&&(X=X.substring(0,Math.round(fa/2))+"..."+X.substring(X.length-Math.round(fa/4)));return X}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,
-M(L,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(X){this.customLinkClicked(z);mxEvent.consume(X)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(fa){fa=z.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&
-null==fa.getState()){var na=this.getCellAt(fa.graphX,fa.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,fa.graphX,fa.graphY)||(fa.state=this.view.getState(na),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var L=!1,M=!1,U=!1,X=this.fireMouseEvent;this.fireMouseEvent=function(fa,na,ua){fa==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
-L=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());X.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(fa,na){var ua=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!ua&&(M&&null==na.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(na.getCell())));
-ua=!L||ua?null:mxUtils.bind(this,function(pa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var za=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+za.x+1,na.getY()+za.y+1,pa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,na,ua])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
-this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");
-z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(X){M||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"),X.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+
-z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],M=0,U=z.rangeCount;M<U;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<
-M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(U){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);
-M=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(X,fa){fa.originalNode=X;X=X.firstChild;for(var na=fa.firstChild;null!=X&&null!=na;)L(X,na),X=X.nextSibling,na=na.nextSibling;
-return fa}function M(X,fa){if(null!=X)if(fa.originalNode!=X)U(X);else for(X=X.firstChild,fa=fa.firstChild;null!=X;){var na=X.nextSibling;null==fa?U(X):(M(X,fa),fa=fa.nextSibling);X=na}}function U(X){for(var fa=X.firstChild;null!=fa;){var na=fa.nextSibling;U(fa);fa=na}1==X.nodeType&&("BR"===X.nodeName||null!=X.firstChild)||3==X.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(X)).length?(3==X.nodeType&&mxUtils.setTextContent(X,mxUtils.getTextContent(X).replace(/\n|\r/g,"")),1==X.nodeType&&(X.removeAttribute("style"),
-X.removeAttribute("class"),X.removeAttribute("width"),X.removeAttribute("cellpadding"),X.removeAttribute("cellspacing"),X.removeAttribute("border"))):X.parentNode.removeChild(X)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(X){var fa=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
-0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,fa):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){ua=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ua.length&&"\n"==ua.charAt(ua.length-1)&&(ua=ua.substring(0,ua.length-1));ua=this.graph.sanitizeHtml(L?
-ua.replace(/\n/g,"<br/>"):ua,!0);this.textarea.className="mxCellEditor geContentEditable";pa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),X=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,fa=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
+this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(za)},mouseMove:function(pa,za){if(na.isMouseDown)null!=this.currentLink&&(pa=Math.abs(this.startX-za.getGraphX()),za=Math.abs(this.startY-za.getGraphY()),(pa>ha||za>ha)&&this.clear());else{for(pa=za.getSource();null!=pa&&"a"!=pa.nodeName.toLowerCase();)pa=pa.parentNode;null!=pa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&na.tooltipHandler.reset(za,!0,this.currentState),(null==this.currentState||za.getState()!=this.currentState&&null!=za.sourceState||!na.intersects(this.currentState,za.getGraphX(),za.getGraphY()))&&this.updateCurrentState(za))}},mouseUp:function(pa,za){var Da=za.getSource();for(pa=za.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ha&&Math.abs(this.scrollTop-na.container.scrollTop)<ha&&(null==za.sourceState||
+!za.isSource(za.sourceState.control))&&((mxEvent.isLeftMouseButton(pa)||mxEvent.isMiddleMouseButton(pa))&&!mxEvent.isPopupTrigger(pa)||mxEvent.isTouchEvent(pa))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==K||K(pa,this.currentLink),mxEvent.isConsumed(pa)||(pa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(pa)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,pa),za.consume())):null!=M&&!za.isConsumed()&&
+Math.abs(this.scrollLeft-na.container.scrollLeft)<ha&&Math.abs(this.scrollTop-na.container.scrollTop)<ha&&Math.abs(this.startX-za.getGraphX())<ha&&Math.abs(this.startY-za.getGraphY())<ha&&M(za.getEvent()));this.clear()},activate:function(pa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(pa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(pa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(pa))},clear:function(){null!=na.container&&
+(na.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(pa){};na.addMouseListener(ua);mxEvent.addListener(document,"mouseleave",function(pa){ua.clear()})};Graph.prototype.duplicateCells=function(z,K){z=null!=z?z:this.getSelectionCells();K=null!=K?K:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);
+var U=this.getModel(),W=this.gridSize,ha=[];U.beginUpdate();try{var na={},ua=this.createCellLookup(z),pa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var za=U.getParent(z[M]);if(null!=za){var Da=this.moveCells([pa[M]],W,W,!1)[0];ha.push(Da);if(K)U.add(za,pa[M]);else{var Ma=za.getIndex(z[M]);U.add(za,pa[M],Ma+1)}if(this.isTable(za)){var La=this.getCellGeometry(pa[M]),Ua=this.getCellGeometry(za);null!=La&&null!=Ua&&(Ua=Ua.clone(),Ua.height+=La.height,U.setGeometry(za,Ua))}}else ha.push(pa[M])}this.updateCustomLinks(this.createCellMapping(na,
+ua),pa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",pa))}finally{U.endUpdate()}return ha};Graph.prototype.insertImage=function(z,K,M){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ha=0;ha<U.length;ha++)W.push(U[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=W[ha-1]){z[ha].setAttribute("width",
+K);z[ha].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),M=[],U=0;U<K.length;U++)M.push(K[U]);document.execCommand("createlink",!1,mxUtils.trim(z));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==M.length+1)for(U=K.length-1;0<=U;U--)if(K[U]!=M[U-1]){for(K=K[U].getElementsByTagName("a");0<K.length;){for(M=
+K[0].parentNode;null!=K[0].firstChild;)M.insertBefore(K[0].firstChild,K[0]);M.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(K||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,K){null==
+K&&(K=this.getSelectionCells());if(null!=K&&1<K.length){for(var M=[],U=null,W=null,ha=0;ha<K.length;ha++)if(this.getModel().isVertex(K[ha])){var na=this.view.getState(K[ha]);if(null!=na){var ua=z?na.getCenterX():na.getCenterY();U=null!=U?Math.max(U,ua):ua;W=null!=W?Math.min(W,ua):ua;M.push(na)}}if(2<M.length){M.sort(function(Ma,La){return z?Ma.x-La.x:Ma.y-La.y});na=this.view.translate;ua=this.view.scale;W=W/ua-(z?na.x:na.y);U=U/ua-(z?na.x:na.y);this.getModel().beginUpdate();try{var pa=(U-W)/(M.length-
+1);U=W;for(ha=1;ha<M.length-1;ha++){var za=this.view.getState(this.model.getParent(M[ha].cell)),Da=this.getCellGeometry(M[ha].cell);U+=pa;null!=Da&&null!=za&&(Da=Da.clone(),z?Da.x=Math.round(U-Da.width/2)-za.origin.x:Da.y=Math.round(U-Da.height/2)-za.origin.y,this.getModel().setGeometry(M[ha].cell,Da))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
+function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(K,M){return this.getLinkForCell(K.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var K=null;null!=z&&0<z.length&&(z=JSON.parse(z),K=new mxImage(z.src,z.width,z.height));return K};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,K,M,U,W,ha,na,ua,pa,za,Da,Ma,La,Ua){var Sa=null;if(null!=Ua)for(Sa=new mxDictionary,Da=0;Da<Ua.length;Da++)Sa.put(Ua[Da],
+!0);if(Ua=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{K=null!=K?K:1;M=null!=M?M:0;W=null!=W?W:!0;ha=null!=ha?ha:!0;na=null!=na?na:!0;za=null!=za?za:!1;var Fa="page"==La?this.view.getBackgroundPageBounds():ha&&null==Sa||U||"diagram"==La?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),va=this.view.scale;"diagram"==La&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+va,(this.view.translate.y+this.backgroundImage.y)*va,this.backgroundImage.width*va,this.backgroundImage.height*va)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));U=K/va;La=W?-.5:0;var ya=Graph.createSvgNode(La,La,Math.max(1,Math.ceil(Fa.width*U)+2*M)+(za&&0==M?5:0),Math.max(1,Math.ceil(Fa.height*U)+2*M)+(za&&0==M?5:0),z),Na=ya.ownerDocument,Ja=null!=Na.createElementNS?Na.createElementNS(mxConstants.NS_SVG,"g"):Na.createElement("g");ya.appendChild(Ja);var Qa=this.createSvgCanvas(Ja);Qa.foOffset=
+W?-.5:0;Qa.textOffset=W?-.5:0;Qa.imageOffset=W?-.5:0;Qa.translate(Math.floor(M/K-Fa.x/va),Math.floor(M/K-Fa.y/va));var Za=document.createElement("div"),cb=Qa.getAlternateText;Qa.getAlternateText=function(db,kb,ib,ob,vb,nb,Bb,yb,mb,pb,gb,rb,tb){if(null!=nb&&0<this.state.fontSize)try{mxUtils.isNode(nb)?nb=nb.innerText:(Za.innerHTML=nb,nb=mxUtils.extractTextWithWhitespace(Za.childNodes));for(var zb=Math.ceil(2*ob/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<nb.length;){var xb=nb.charCodeAt(lb);
+if(10==xb||13==xb){if(0<Ab)break}else wb.push(nb.charAt(lb)),255>xb&&Ab++;lb++}wb.length<nb.length&&1<nb.length-wb.length&&(nb=mxUtils.trim(wb.join(""))+"...");return nb}catch(c){return cb.apply(this,arguments)}else return cb.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=va/K;var qb=this.view.translate;La=new mxRectangle((fb.x+qb.x)*z,(fb.y+qb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Fa,La)&&Qa.image(fb.x+qb.x,fb.y+qb.y,fb.width,fb.height,fb.src,!0)}Qa.scale(U);Qa.textEnabled=
+na;ua=null!=ua?ua:this.createSvgImageExport();var ub=ua.drawCellState,ab=ua.getLinkForCellState;ua.getLinkForCellState=function(db,kb){var ib=ab.apply(this,arguments);return null==ib||db.view.graph.isCustomLink(ib)?null:ib};ua.getLinkTargetForCellState=function(db,kb){return db.view.graph.getLinkTargetForCell(db.cell)};ua.drawCellState=function(db,kb){for(var ib=db.view.graph,ob=null!=Sa?Sa.get(db.cell):ib.isCellSelected(db.cell),vb=ib.model.getParent(db.cell);!(ha&&null==Sa||ob)&&null!=vb;)ob=null!=
+Sa?Sa.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(ha&&null==Sa||ob)&&ub.apply(this,arguments)};ua.drawState(this.getView().getState(this.model.root),Qa);this.updateSvgLinks(ya,pa,!0);this.addForeignObjectWarning(Qa,ya);return ya}finally{Ua&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),U=z.createElement("g");
+U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");
+z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(U);W.appendChild(z);M.appendChild(W);K.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,K,M){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));null!=W&&(null!=K&&/^https?:\/\//.test(W)?
+z[U].setAttribute("target",K):M&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(z=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());
+return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,K,M){for(;null!=z&&z.nodeName!=K;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=
+function(z,K,M){for(;null!=z&&!(0<=mxUtils.indexOf(K,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var M=document.createRange();M.selectNode(z);K.removeAllRanges();K.addRange(M)}}else(K=document.selection)&&"Control"!=K.type&&(z=K.createRange(),z.collapse(!0),M=K.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,
+K,M){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)K?U.points[W].x=M+(M-U.points[W].x):U.points[W].y=M+(M-U.points[W].y);W=function(ha){null!=ha&&(K?ha.x=M+(M-ha.x):ha.y=M+(M-ha.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,K,M){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),W=0;W<U;W++){var ha=this.model.getChildAt(z,W);if(this.model.isEdge(ha))this.flipEdgePoints(ha,
+K,M);else{var na=this.getCellGeometry(ha);null!=na&&(na=na.clone(),K?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(ha,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,K){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],K,(K?W.getCenterX():W.getCenterY())/this.view.scale-(K?W.origin.x:W.origin.y)-(K?this.view.translate.x:
+this.view.translate.y))}else{var ha=this.getCellGeometry(z[U]);null!=ha&&this.flipChildren(z[U],K,K?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);M.push(z[U])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,K){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=this.model.getParent(z[U]);if(this.isTable(W)){var ha=this.getCellGeometry(z[U]),na=this.getCellGeometry(W);
+null!=ha&&null!=na&&(na=na.clone(),na.height-=ha.height,this.model.setGeometry(W,na))}}var ua=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,K)}finally{this.model.endUpdate()}if(null!=ua)for(M=[],U=0;U<ua.length;U++)this.model.contains(ua[U])&&(this.model.isVertex(ua[U])||this.model.isEdge(ua[U]))&&M.push(ua[U])}return M};Graph.prototype.insertTableColumn=function(z,K){var M=this.getModel();M.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ha=M.getParent(z);
+U=M.getParent(ha);W=mxUtils.indexOf(M.getChildCells(ha,!0),z)}else this.isTableRow(z)?U=M.getParent(z):z=M.getChildCells(U,!0)[0],K||(W=M.getChildCells(z,!0).length-1);var na=M.getChildCells(U,!0),ua=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var pa=M.getChildCells(na[z],!0)[W],za=M.cloneCell(pa,!1),Da=this.getCellGeometry(za);za.value=null;za.style=mxUtils.setStyle(mxUtils.setStyle(za.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
+Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ua=Da.width;var Ma=this.getCellGeometry(na[z]);null!=Ma&&(Da.height=Ma.height)}M.add(na[z],za,W+(K?0:1))}var La=this.getCellGeometry(U);null!=La&&(La=La.clone(),La.width+=ua,M.setGeometry(U,La))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var K=this.getModel();K.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:K.getParent(z);var U=K.getChildCells(M,!0);0==U.length?K.remove(M):(M==
+z&&(z=U[U.length-1]),K.remove(z))}finally{K.endUpdate()}};Graph.prototype.insertLane=function(z,K){var M=this.getModel();M.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=M.getChildCells(U,!0);z=W[K?0:W.length-1]}else U=M.getParent(z);var ha=U.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(U,z,ha+(K?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,K){var M=this.getModel();M.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=
+M.getParent(z),U=M.getParent(W);else if(this.isTableRow(z))U=M.getParent(z);else{var ha=M.getChildCells(U,!0);W=ha[K?0:ha.length-1]}var na=M.getChildCells(W,!0),ua=U.getIndex(W);W=M.cloneCell(W,!1);W.value=null;var pa=this.getCellGeometry(W);if(null!=pa){for(ha=0;ha<na.length;ha++){z=M.cloneCell(na[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var za=this.getCellGeometry(z);null!=za&&(null!=za.alternateBounds&&(za.width=za.alternateBounds.width,
+za.height=za.alternateBounds.height,za.alternateBounds=null),za.height=pa.height);W.insert(z)}M.add(U,W,ua+(K?0:1));var Da=this.getCellGeometry(U);null!=Da&&(Da=Da.clone(),Da.height+=pa.height,M.setGeometry(U,Da))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var K=this.getModel();K.beginUpdate();try{var M=z,U=z;this.isTableCell(z)&&(U=K.getParent(z));this.isTableRow(U)&&(M=K.getParent(U));var W=K.getChildCells(M,!0);if(0==W.length)K.remove(M);else{this.isTableRow(U)||(U=
+W[0]);var ha=K.getChildCells(U,!0);if(1>=ha.length)K.remove(M);else{var na=ha.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ha,z));for(U=z=0;U<W.length;U++){var ua=K.getChildCells(W[U],!0)[na];K.remove(ua);var pa=this.getCellGeometry(ua);null!=pa&&(z=Math.max(z,pa.width))}var za=this.getCellGeometry(M);null!=za&&(za=za.clone(),za.width-=z,K.setGeometry(M,za))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var K=this.getModel();K.beginUpdate();try{var M=z,U=z;this.isTableCell(z)&&
+(z=U=K.getParent(z));this.isTableRow(z)&&(M=K.getParent(U));var W=K.getChildCells(M,!0);if(1>=W.length)K.remove(M);else{this.isTableRow(U)||(U=W[W.length-1]);K.remove(U);z=0;var ha=this.getCellGeometry(U);null!=ha&&(z=ha.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,K.setGeometry(M,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(z,K){for(var M=z.tBodies[0],U=M.rows[0].cells,W=z=0;W<U.length;W++){var ha=U[W].getAttribute("colspan");z+=null!=ha?parseInt(ha):
+1}K=M.insertRow(K);for(W=0;W<z;W++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(z,K){z.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(z,K){var M=z.tHead;if(null!=M)for(var U=0;U<M.rows.length;U++){var W=document.createElement("th");M.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)U=z.rows[M].insertCell(K),mxUtils.br(U);return z.rows[0].cells[0<=K?K:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,
+K){if(0<=K){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>K&&z[M].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var U;U=M.firstChild;)lastNode=z.appendChild(U);K.insertNode(z)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=
+function(z,K){function M(W,ha){W.length>ha&&(W=W.substring(0,Math.round(ha/2))+"..."+W.substring(W.length-Math.round(ha/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,
+M(K,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&
+null==ha.getState()){var na=this.getCellAt(ha.graphX,ha.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ha.graphX,ha.graphY)||(ha.state=this.view.getState(na),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var K=!1,M=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=function(ha,na,ua){ha==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
+K=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ha,na){var ua=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!ua&&(M&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));
+ua=!K||ua?null:mxUtils.bind(this,function(pa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var za=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+za.x+1,na.getY()+za.y+1,pa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,na,ua])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
+this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var K=this.textarea.ownerDocument.defaultView.getSelection(),M=K.getRangeAt(0),U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");
+z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);K.removeAllRanges();K.addRange(M)};mxCellEditor.prototype.alignText=function(z,K){var M=null!=K&&mxEvent.isShiftDown(K);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){M||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+
+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var K=[],M=0,U=z.rangeCount;M<U;++M)K.push(z.getRangeAt(M));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,M=z.length;K<
+M;++K)sel.addRange(z[K])}else document.selection&&z.select&&z.select()}catch(U){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,K){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,K){z=this.graph.getStartEditingCell(z,K);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);
+M=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Z=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function K(W,ha){ha.originalNode=W;W=W.firstChild;for(var na=ha.firstChild;null!=W&&null!=na;)K(W,na),W=W.nextSibling,na=na.nextSibling;
+return ha}function M(W,ha){if(null!=W)if(ha.originalNode!=W)U(W);else for(W=W.firstChild,ha=ha.firstChild;null!=W;){var na=W.nextSibling;null==ha?U(W):(M(W,ha),ha=ha.nextSibling);W=na}}function U(W){for(var ha=W.firstChild;null!=ha;){var na=ha.nextSibling;U(ha);ha=na}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),
+W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}Z.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ha=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var K=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){ua=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ua.length&&"\n"==ua.charAt(ua.length-1)&&(ua=ua.substring(0,ua.length-1));ua=this.graph.sanitizeHtml(K?
+ua.replace(/\n/g,"<br/>"):ua,!0);this.textarea.className="mxCellEditor geContentEditable";pa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(pa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=X?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=ua&&(this.textarea.innerHTML=ua,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
-this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ua=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ua=mxUtils.replaceTrailingNewlines(ua,"<div><br></div>"));ua=this.graph.sanitizeHtml(L?ua.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ua,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var pa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*
+Math.round(pa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=ua&&(this.textarea.innerHTML=ua,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
+this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ua=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ua=mxUtils.replaceTrailingNewlines(ua,"<div><br></div>"));ua=this.graph.sanitizeHtml(K?ua.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ua,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var pa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*
mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ua&&(this.textarea.innerHTML=ua);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
-this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var ca=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,
+this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var ca=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,K){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,
mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+M+","+
-M+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ca.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=
-mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&
-this.toggleViewMode();ba.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};
-mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,
-mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=
-mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;
-z=this.roundLength((this.bounds.x+this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=
-null)};var qa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var U=this.graph.model.getParent(z),X=null!=U?this.graph.getCellGeometry(U):null;if(null!=X&&(M=this.graph.getCellStyle(U),"stackLayout"==M.childLayout)){var fa=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(U);
-X=X.clone();M?X.height=L.height+na.y+na.height+2*fa:X.width=L.width+na.x+na.width+2*fa;this.graph.model.setGeometry(U,X)}}};var N=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(ua){M.get(ua)||(M.put(ua,!0),X.push(ua))}for(var L=N.apply(this,arguments),M=new mxDictionary,U=this.graph.model,X=[],fa=0;fa<L.length;fa++){var na=L[fa];this.graph.isTableCell(na)?z(U.getParent(U.getParent(na))):this.graph.isTableRow(na)&&
-z(U.getParent(na));z(na)}return X};var Y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=Y.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
-function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;
-mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.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 ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
-function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var V=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||V.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
-(z=2);return z};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var W=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==W&&(W=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ra,Fa,va){for(var ya=[],Na=0;Na<Ra.length;Na++){var Ja=
-Ra[Na];ya.push(null==Ja?null:new mxPoint((pa+Ja.x+Fa)*fa,(za+Ja.y+va)*fa))}return ya},M=this,U=this.graph,X=U.model,fa=U.view.scale,na=this.state,ua=this.selectionBorder,pa=this.state.origin.x+U.view.translate.x,za=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var Da=U.view.getCellStates(X.getChildCells(this.state.cell,!0));if(0<Da.length){var Ma=X.getChildCells(Da[0].cell,!0),La=U.getTableLines(this.state.cell,!1,!0),Ua=U.getTableLines(this.state.cell,!0,!1);for(X=0;X<Da.length;X++)mxUtils.bind(this,
-function(Ra){var Fa=Da[Ra],va=Ra<Da.length-1?Da[Ra+1]:null;va=null!=va?U.getCellGeometry(va.cell):null;var ya=null!=va&&null!=va.alternateBounds?va.alternateBounds:va;va=null!=Ua[Ra]?new W(Ua[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);va.isDashed=ua.isDashed;va.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,va);Fa.tableHandle=!0;var Na=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
-this.shape){this.shape.stroke=0==Na?mxConstants.NONE:ua.stroke;if(this.shape.constructor==W)this.shape.line=L(Ua[Ra],0,Na),this.shape.updateBoundsFromLine();else{var Pa=U.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Na*fa;this.shape.bounds.x=na.x+(Ra==Da.length-1?0:Pa.x*fa);this.shape.bounds.width=na.width-(Ra==Da.length-1?0:Pa.width+Pa.x+fa)}this.shape.redraw()}};var Ja=!1;Fa.setPosition=function(Pa,Ya,cb){Na=Math.max(Graph.minTableRowHeight-
-Pa.height,Ya.y-Pa.y-Pa.height);Ja=mxEvent.isShiftDown(cb.getEvent());null!=ya&&Ja&&(Na=Math.min(Na,ya.height-Graph.minTableRowHeight))};Fa.execute=function(Pa){if(0!=Na)U.setTableRowHeight(this.state.cell,Na,!Ja);else if(!M.blockDelayedSelection){var Ya=U.getCellAt(Pa.getGraphX(),Pa.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(Ya,Pa)}Na=0};Fa.reset=function(){Na=0};z.push(Fa)})(X);for(X=0;X<Ma.length;X++)mxUtils.bind(this,function(Ra){var Fa=U.view.getState(Ma[Ra]),va=U.getCellGeometry(Ma[Ra]),
-ya=null!=va.alternateBounds?va.alternateBounds:va;null==Fa&&(Fa=new mxCellState(U.view,Ma[Ra],U.getCellStyle(Ma[Ra])),Fa.x=na.x+va.x*fa,Fa.y=na.y+va.y*fa,Fa.width=ya.width*fa,Fa.height=ya.height*fa,Fa.updateCachedBounds());va=Ra<Ma.length-1?Ma[Ra+1]:null;va=null!=va?U.getCellGeometry(va):null;var Na=null!=va&&null!=va.alternateBounds?va.alternateBounds:va;va=null!=La[Ra]?new W(La[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);va.isDashed=ua.isDashed;va.svgStrokeTolerance++;
-Fa=new mxHandle(Fa,"col-resize",null,va);Fa.tableHandle=!0;var Ja=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ja?mxConstants.NONE:ua.stroke;if(this.shape.constructor==W)this.shape.line=L(La[Ra],Ja,0),this.shape.updateBoundsFromLine();else{var Ya=U.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(ya.width+Ja)*fa;this.shape.bounds.y=na.y+(Ra==Ma.length-
-1?0:Ya.y*fa);this.shape.bounds.height=na.height-(Ra==Ma.length-1?0:(Ya.height+Ya.y)*fa)}this.shape.redraw()}};var Pa=!1;Fa.setPosition=function(Ya,cb,fb){Ja=Math.max(Graph.minTableColumnWidth-ya.width,cb.x-Ya.x-ya.width);Pa=mxEvent.isShiftDown(fb.getEvent());null==Na||Pa||(Ja=Math.min(Ja,Na.width-Graph.minTableColumnWidth))};Fa.execute=function(Ya){if(0!=Ja)U.setTableColumnWidth(this.state.cell,Ja,Pa);else if(!M.blockDelayedSelection){var cb=U.getCellAt(Ya.getGraphX(),Ya.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(cb,
-Ya)}Ja=0};Fa.positionChanged=function(){};Fa.reset=function(){Ja=0};z.push(Fa)})(X)}}return null!=z?z.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){S.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
-function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=
-M;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(X){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(X)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,X);mxEvent.isPopupTrigger(X)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(X),mxEvent.getClientY(X),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(X),this.graph.isMouseDown=!0);
-mxEvent.consume(X)}),null,mxUtils.bind(this,function(X){mxEvent.isPopupTrigger(X)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(X),mxEvent.getClientY(X),M.cell,X),mxEvent.consume(X))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
-this.refreshMoveHandles()};var ha=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var X=
-this.customHandles[U].shape.bounds,fa=X.getCenterX(),na=X.getCenterY();if(Math.abs(this.state.x-fa)<X.width/2||Math.abs(this.state.y-na)<X.height/2||Math.abs(this.state.x+this.state.width-fa)<X.width/2||Math.abs(this.state.y+this.state.height-na)<X.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ha.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
-function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
-"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.apply(this,arguments);null!=
-this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=
-this.graph.view.translate,U=this.graph.view.scale,X=this.roundLength(L.x/U-M.x);M=this.roundLength(L.y/U-M.y);U=this.graph.view.unit;this.hint.innerHTML=e(X,U)+", "+e(M,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(X=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*X.x)+"%, "+Math.round(100*X.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
-"hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+M+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ca.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,K){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,K);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=
+mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return K="1"==mxUtils.getValue(z.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var aa=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&
+this.toggleViewMode();aa.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,K){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==K&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};
+mxCellEditor.prototype.getBackgroundColor=function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(z){var K=mxUtils.getValue(z.style,
+mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(z){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=
+mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,M=this.graph.view.scale;
+z=this.roundLength((this.bounds.x+this.currentDx)/M-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/M-K.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(K,M);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=
+null)};var qa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,K){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(M=this.graph.getCellStyle(U),"stackLayout"==M.childLayout)){var ha=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(U);
+W=W.clone();M?W.height=K.height+na.y+na.height+2*ha:W.width=K.width+na.x+na.width+2*ha;this.graph.model.setGeometry(U,W)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(ua){M.get(ua)||(M.put(ua,!0),W.push(ua))}for(var K=Q.apply(this,arguments),M=new mxDictionary,U=this.graph.model,W=[],ha=0;ha<K.length;ha++){var na=K[ha];this.graph.isTableCell(na)?z(U.getParent(U.getParent(na))):this.graph.isTableRow(na)&&
+z(U.getParent(na));z(na)}return W};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var K=X.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var fa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var K=fa.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,K){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;
+mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.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 ia=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
+function(){return ia.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var V=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||V.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
+(z=2);return z};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ea=null,O=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==ea&&(ea=mxCellRenderer.defaultShapes.tableLine);var z=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Sa,Fa,va){for(var ya=[],Na=0;Na<Sa.length;Na++){var Ja=
+Sa[Na];ya.push(null==Ja?null:new mxPoint((pa+Ja.x+Fa)*ha,(za+Ja.y+va)*ha))}return ya},M=this,U=this.graph,W=U.model,ha=U.view.scale,na=this.state,ua=this.selectionBorder,pa=this.state.origin.x+U.view.translate.x,za=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var Da=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<Da.length){var Ma=W.getChildCells(Da[0].cell,!0),La=U.getTableLines(this.state.cell,!1,!0),Ua=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<Da.length;W++)mxUtils.bind(this,
+function(Sa){var Fa=Da[Sa],va=Sa<Da.length-1?Da[Sa+1]:null;va=null!=va?U.getCellGeometry(va.cell):null;var ya=null!=va&&null!=va.alternateBounds?va.alternateBounds:va;va=null!=Ua[Sa]?new ea(Ua[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);va.isDashed=ua.isDashed;va.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,va);Fa.tableHandle=!0;var Na=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
+this.shape){this.shape.stroke=0==Na?mxConstants.NONE:ua.stroke;if(this.shape.constructor==ea)this.shape.line=K(Ua[Sa],0,Na),this.shape.updateBoundsFromLine();else{var Qa=U.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Na*ha;this.shape.bounds.x=na.x+(Sa==Da.length-1?0:Qa.x*ha);this.shape.bounds.width=na.width-(Sa==Da.length-1?0:Qa.width+Qa.x+ha)}this.shape.redraw()}};var Ja=!1;Fa.setPosition=function(Qa,Za,cb){Na=Math.max(Graph.minTableRowHeight-
+Qa.height,Za.y-Qa.y-Qa.height);Ja=mxEvent.isShiftDown(cb.getEvent());null!=ya&&Ja&&(Na=Math.min(Na,ya.height-Graph.minTableRowHeight))};Fa.execute=function(Qa){if(0!=Na)U.setTableRowHeight(this.state.cell,Na,!Ja);else if(!M.blockDelayedSelection){var Za=U.getCellAt(Qa.getGraphX(),Qa.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(Za,Qa)}Na=0};Fa.reset=function(){Na=0};z.push(Fa)})(W);for(W=0;W<Ma.length;W++)mxUtils.bind(this,function(Sa){var Fa=U.view.getState(Ma[Sa]),va=U.getCellGeometry(Ma[Sa]),
+ya=null!=va.alternateBounds?va.alternateBounds:va;null==Fa&&(Fa=new mxCellState(U.view,Ma[Sa],U.getCellStyle(Ma[Sa])),Fa.x=na.x+va.x*ha,Fa.y=na.y+va.y*ha,Fa.width=ya.width*ha,Fa.height=ya.height*ha,Fa.updateCachedBounds());va=Sa<Ma.length-1?Ma[Sa+1]:null;va=null!=va?U.getCellGeometry(va):null;var Na=null!=va&&null!=va.alternateBounds?va.alternateBounds:va;va=null!=La[Sa]?new ea(La[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);va.isDashed=ua.isDashed;va.svgStrokeTolerance++;
+Fa=new mxHandle(Fa,"col-resize",null,va);Fa.tableHandle=!0;var Ja=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ja?mxConstants.NONE:ua.stroke;if(this.shape.constructor==ea)this.shape.line=K(La[Sa],Ja,0),this.shape.updateBoundsFromLine();else{var Za=U.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(ya.width+Ja)*ha;this.shape.bounds.y=na.y+(Sa==Ma.length-
+1?0:Za.y*ha);this.shape.bounds.height=na.height-(Sa==Ma.length-1?0:(Za.height+Za.y)*ha)}this.shape.redraw()}};var Qa=!1;Fa.setPosition=function(Za,cb,fb){Ja=Math.max(Graph.minTableColumnWidth-ya.width,cb.x-Za.x-ya.width);Qa=mxEvent.isShiftDown(fb.getEvent());null==Na||Qa||(Ja=Math.min(Ja,Na.width-Graph.minTableColumnWidth))};Fa.execute=function(Za){if(0!=Ja)U.setTableColumnWidth(this.state.cell,Ja,Qa);else if(!M.blockDelayedSelection){var cb=U.getCellAt(Za.getGraphX(),Za.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(cb,
+Za)}Ja=0};Fa.positionChanged=function(){};Fa.reset=function(){Ja=0};z.push(Fa)})(W)}}return null!=z?z.reverse():null};var N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){N.apply(this,arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
+function(){var z=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=[];for(K=0;K<z.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=
+M;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);
+mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),M.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
+this.refreshMoveHandles()};var ba=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),K=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=
+this.customHandles[U].shape.bounds,ha=W.getCenterX(),na=W.getCenterY();if(Math.abs(this.state.x-ha)<W.width/2||Math.abs(this.state.y-na)<W.height/2||Math.abs(this.state.x+this.state.width-ha)<W.width/2||Math.abs(this.state.y+this.state.height-na)<W.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),z.x=this.sizers[0].bounds.width+K,z.y=this.sizers[0].bounds.height+K):z=ba.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
+function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var K=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),K)+" x "+e(this.roundLength(this.bounds.height/z),K)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
+"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,K){la.apply(this,arguments);null!=
+this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=
+this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(K.x/U-M.x);M=this.roundLength(K.y/U-M.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(M,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
+"hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),K.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2630,264 +2631,264 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var H=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,L){H.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,U=null,X=null,fa=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,X=this.first.y,z=(this.currentX-U)/this.graph.view.scale,fa=(this.currentY-X)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(U,X,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var ua=this.graph.view.getState(na[M]),pa=this.graph.getCellGeometry(na[M]);null!=ua&&null!=pa&&(pa=pa.clone(),pa.translate(z,fa),this.graph.model.setGeometry(na[M],pa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var U=this.first.x-z,X=this.first.y-M,fa=this.graph.tolerance;if(null!=this.div||Math.abs(U)>fa||Math.abs(X)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,this.graph.isGridEnabled()||
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var K=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(K)||mxEvent.isPopupTrigger(K)&&(null==z.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))};var H=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(z,K){H.apply(this,arguments);mxEvent.isTouchEvent(K.getEvent())&&this.graph.isCellSelected(K.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var K=z.getEvent();return mxEvent.isLeftMouseButton(K)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(K)&&!mxEvent.isShiftDown(K))||this.usePopupTrigger&&mxEvent.isPopupTrigger(K)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ha=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ha=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(M){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
+!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var ua=this.graph.view.getState(na[M]),pa=this.graph.getCellGeometry(na[M]);null!=ua&&null!=pa&&(pa=pa.clone(),pa.translate(z,ha),this.graph.model.setGeometry(na[M],pa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(z,K){if(!K.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=K.getX()+M.x;M=K.getY()+M.y;var U=this.first.x-z,W=this.first.y-M,ha=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ha||Math.abs(W)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(K)?(z=this.x+this.width,M=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,this.graph.isGridEnabled()||
(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=M-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=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&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var O=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var T=(new Date).getTime(),R=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,U){da.apply(this,arguments);M!=this.currentTerminalState?(T=(new Date).getTime(),
-R=0):R=(new Date).getTime()-T;this.currentTerminalState=M};var P=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&P.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,L,M){L=null!=z&&0==z;var U=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
-new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ma=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,M){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return ma.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=U&&U.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return ra.apply(this,arguments)};var xa=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=xa.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var ta=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):ta.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),U=M.getParent(this.state.cell),X=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(U)||null==X||!X.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ca.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 Ba=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Ba.apply(this,arguments);null!=this.rotationShape&&null!=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var T=(new Date).getTime(),S=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,K,M,U){da.apply(this,arguments);M!=this.currentTerminalState?(T=(new Date).getTime(),
+S=0):S=(new Date).getTime()-T;this.currentTerminalState=M};var R=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<S||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&R.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,K,M){K=null!=z&&0==z;var U=this.state.getVisibleTerminalState(K);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,K):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
+new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ma=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,K,M){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return ma.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var K=this.graph.getModel(),M=K.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(K.isEdge(M)&&null!=U&&U.relative&&(K=this.graph.view.getState(z[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return ra.apply(this,arguments)};var xa=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=xa.apply(this,arguments),K=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&K.push(z[M]);return K};var ta=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var K=this.graph.getModel(),M=K.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return K.isEdge(M)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(K=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):ta.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,K){var M=this.graph.getModel(),U=M.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!M.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),K=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&K==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,K){Ca.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 Ba=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,K){Ba.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 z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var U=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(X,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(X,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-L=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(L,M);if(null!=L||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var U=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(W,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+K=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(K,M);if(null!=K||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,K){try{if(null==z&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var U=M.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=L)for(M=0;M<L.length;M++){var X=document.createElement("div");X.style.marginTop=null!=z||0<M?"6px":"0px";X.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(X)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};
-mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Oa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
-this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(U,X){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=
-L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ta=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ta.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
-this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,M=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-M+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-
-2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
-this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=L&&(M=Math.max(M,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
-2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var $a=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){$a.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var U=M.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=K)for(M=0;M<K.length;M++){var W=document.createElement("div");W.style.marginTop=null!=z||0<M?"6px":"0px";W.appendChild(this.graph.createLinkForHint(K[M].getAttribute("href"),mxUtils.getTextContent(K[M])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};
+mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Pa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Pa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
+this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=
+K||null!=M&&0<M.length)this.updateLinkHint(K,M),this.redrawHandles()};var Ta=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ta.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var K=this.cornerHandles,M=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+z;K[0].bounds.y=this.state.y-M+z;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*z;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
+2*z;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Oa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
+this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=K&&(M=Math.max(M,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
+2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Xa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Xa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ga=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ga.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var eb=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){eb.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var bb=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){bb.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
-function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(){mxActor.call(this)}function Z(){mxActor.call(this)}function qa(){mxActor.call(this)}function N(){mxActor.call(this)}function Y(c,l){this.canvas=c;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,Y.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,Y.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,Y.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,Y.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-Y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,Y.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function V(){mxActor.call(this)}function J(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function Q(){mxRectangleShape.call(this)}function S(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function la(){mxShape.call(this)}function u(){mxEllipse.call(this)}
-function H(){mxShape.call(this)}function O(){mxShape.call(this)}function T(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function da(){mxShape.call(this)}function P(){mxShape.call(this)}function ma(){mxShape.call(this)}function ra(){mxShape.call(this)}function xa(){mxCylinder.call(this)}function ta(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ba(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);
-this.spacing=0}function Oa(){mxArrowConnector.call(this);this.spacing=0}function Ta(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function $a(){mxActor.call(this)}function Ga(){mxActor.call(this)}function eb(){mxActor.call(this)}function bb(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function U(){mxActor.call(this)}function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function na(){mxEllipse.call(this)}
-function ua(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function za(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ua(){mxEllipse.call(this)}function Ra(){mxActor.call(this)}function Fa(){mxActor.call(this)}function va(){mxActor.call(this)}function ya(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function Ja(c,l,x,p,v,A,B,ia,K,wa){B+=K;var oa=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
-c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
-p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,B=this.isHorizontal(),ia=this.getTitleSize();0==ia||this.outline?La.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ia<v||!B&&ia<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ia=A;A=B;B=ia}c.rotate(-this.getShapeRotation(),
-A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
-c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ia=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
-c.lineTo(A,A),c.close(),c.fill()),0!=ia&&(c.setFillAlpha(Math.abs(ia)),c.setFillColor(0>ia?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
-n);var Pa=Math.tan(mxUtils.toRadians(30)),Ya=(.5-Pa)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
-20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Pa);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Ya);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Ya)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Pa));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Ya)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Ya)*l),c.lineTo(.5*l,(1-Ya)*l)):(c.translate((p-
-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Ya),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Ya)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),
-c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
-function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=
-function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(l,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(q,mxShape);
-q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
-mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
-c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
-60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ia=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));ia||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
-x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
-"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,
-c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=
-0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
-20,20),c.fillAndStroke()):"connPointRefExit"==x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=
-function(){return!0};G.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,l,
-x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
-this.direction==mxConstants.DIRECTION_WEST)return l*=p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(ca,mxActor);ca.prototype.size=.3;ca.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ca.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",ca);var cb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):cb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==
-mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};I.prototype.getLabelMargins=function(c){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(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
-p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Z,mxActor);Z.prototype.size=.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,x,p,v){l="0"!=
-mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(qa,mxActor);qa.prototype.size=
-.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(N,mxActor);N.prototype.redrawPath=
-function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",N);Y.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};Y.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)};Y.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};Y.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};Y.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};Y.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===
-typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ia=this.defaultVariation;5>B&&(B=5,ia/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ia;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};Y.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
-var qb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){qb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new Y(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=Y)ab.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function qa(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,X.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function fa(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function V(){mxActor.call(this)}function L(){mxActor.call(this)}function ea(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function la(){mxShape.call(this)}function u(){mxEllipse.call(this)}function H(){mxShape.call(this)}
+function P(){mxShape.call(this)}function T(){mxRectangleShape.call(this)}function S(){mxShape.call(this)}function da(){mxShape.call(this)}function R(){mxShape.call(this)}function ma(){mxShape.call(this)}function ra(){mxShape.call(this)}function xa(){mxCylinder.call(this)}function ta(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ba(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);this.spacing=0}function Pa(){mxArrowConnector.call(this);
+this.spacing=0}function Ta(){mxActor.call(this)}function Oa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function eb(){mxActor.call(this)}function bb(){mxActor.call(this)}function z(){mxActor.call(this)}function K(){mxActor.call(this)}function M(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ha(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
+function za(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ua(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function va(){mxActor.call(this)}function ya(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}
+function Ja(c,l,x,p,v,A,B,ja,J,wa){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,
+x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ja=this.getTitleSize();0==ja||this.outline?La.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ja<v||!B&&ja<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ja=A;A=B;B=ja}c.rotate(-this.getShapeRotation(),A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/
+s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ja=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),c.lineTo(A,A),c.close(),c.fill()),0!=ja&&(c.setFillAlpha(Math.abs(ja)),c.setFillColor(0>ja?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",n);var Qa=Math.tan(mxUtils.toRadians(30)),Za=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,
+mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Qa);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,
+.25*l);c.lineTo(.5*l,l*Za);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Za)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Qa));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Za)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Za)*l),c.lineTo(.5*l,(1-Za)*l)):(c.translate((p-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Za),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
+l,(1-Za)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,
+-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(l,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(q,mxShape);q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*
+v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=
+15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;
+C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ja=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ja||(J*=Math.min(p,v));
+J=Math.min(J,.5*p,.5*(v-x));l=Math.max(l,J);l=Math.min(p-J,l);B||(J=0);c.begin();"left"==A?(c.moveTo(Math.max(J,0),x),c.lineTo(Math.max(J,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(J,0),0),c.lineTo(p-Math.max(J,0),x));B?(c.moveTo(0,J+x),c.arcTo(J,J,0,0,1,J,x),c.lineTo(p-J,x),c.arcTo(J,J,0,0,1,p,J+x),c.lineTo(p,v-J),c.arcTo(J,J,0,0,1,p-J,v),c.lineTo(J,v),c.arcTo(J,J,0,0,1,0,v-J)):(c.moveTo(0,x),c.lineTo(p,x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-
+l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,
+l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=
+function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Z,mxActor);Z.prototype.size=.4;Z.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};Z.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
+p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",Z);mxUtils.extend(ca,mxActor);ca.prototype.size=.3;ca.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ca.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",ca);var cb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):cb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};I.prototype.getLabelMargins=function(c){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(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",aa);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(qa,mxActor);qa.prototype.size=.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);
+l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.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)};
+X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=
+Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ja=this.defaultVariation;5>B&&(B=5,ja/=3);var J=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ja;this.originalLineTo.call(this.canvas,J*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var qb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){qb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)ab.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
-A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(fa,mxRectangleShape);fa.prototype.size=.1;fa.prototype.fixedSize=!1;fa.prototype.isHtmlAllowed=function(){return!1};fa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
-ea.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ia=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ia),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,
+fa.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",fa);mxCellRenderer.registerShape("process2",fa);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ia,mxHexagon);ia.prototype.size=30;ia.prototype.position=.5;ia.prototype.position2=.5;ia.prototype.base=20;ia.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ja=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ja),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ia);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,
v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-V);mxUtils.extend(J,mxHexagon);J.prototype.size=.25;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",J);mxUtils.extend(W,mxRectangleShape);W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-W);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),db.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ia=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],Za=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Za,hb=this.style["symbol"+A+"ArcSpacing"];null!=hb&&(hb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),Za+=hb,jb+=hb);hb=l;var Ea=x;hb=ia==mxConstants.ALIGN_CENTER?hb+(p-wa)/2:ia==mxConstants.ALIGN_RIGHT?hb+(p-wa-Za):hb+Za;Ea=K==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:K==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ia=new B;ia.style=this.style;B.prototype.paintVertexShape.call(ia,c,hb,Ea,wa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",Q);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",S);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ha);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(O,mxShape);
-O.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};O.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};O.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",O);mxUtils.extend(T,mxRectangleShape);T.prototype.size=
+V);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(ea,mxRectangleShape);ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",ea);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),db.apply(this,[c,l,x,p,v]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};O.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ja=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+$a,hb=this.style["symbol"+A+"ArcSpacing"];null!=hb&&(hb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=hb,jb+=hb);hb=l;var Ea=x;hb=ja==mxConstants.ALIGN_CENTER?hb+(p-wa)/2:ja==mxConstants.ALIGN_RIGHT?hb+(p-wa-$a):hb+$a;Ea=J==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ja=new B;ja.style=this.style;B.prototype.paintVertexShape.call(ja,c,hb,Ea,wa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",O);mxUtils.extend(N,mxCylinder);N.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",N);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(P,mxShape);
+P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};P.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(T,mxRectangleShape);T.prototype.size=
40;T.prototype.isHtmlAllowed=function(){return!1};T.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};T.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=T&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};T.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",T);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ia=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ia-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ia);c.lineTo(l,x+ia);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ia);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+A))};mxCellRenderer.registerShape("umlLifeline",T);mxUtils.extend(S,mxShape);S.prototype.width=60;S.prototype.height=30;S.prototype.corner=10;S.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};S.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ja=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ja-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ja);c.lineTo(l,x+ja);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ja);c.stroke()};mxCellRenderer.registerShape("umlFrame",S);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
l,x,p){p=T.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ia=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K,ia+v),new mxPoint(B+
-K,ia+wa),new mxPoint(B,ia+wa-v),new mxPoint(B,ia)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,ia+wa),new mxPoint(B,ia+wa),new mxPoint(B+v,ia)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ia,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?Z.prototype.fixedSize:Z.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ia=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,ia+wa),new mxPoint(B,ia+wa),new mxPoint(B+
-v,ia)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,ia+wa),new mxPoint(B+v,ia+wa),new mxPoint(B,ia)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia+v),new mxPoint(B+K,ia),new mxPoint(B+K,ia+wa),new mxPoint(B,ia+wa-v),new mxPoint(B,ia+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+
-K,ia+v),new mxPoint(B+K,ia+wa-v),new mxPoint(B,ia+wa),new mxPoint(B,ia)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ia,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?V.prototype.fixedSize:V.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ia=c.y,K=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,c),new mxPoint(B+K-v,ia+wa),new mxPoint(B,ia+wa),new mxPoint(B+v,c),new mxPoint(B,ia)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,c),new mxPoint(B+K,ia+wa),new mxPoint(B+v,ia+wa),new mxPoint(B,c),new mxPoint(B+v,ia)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia+v),new mxPoint(oa,ia),new mxPoint(B+K,ia+v),new mxPoint(B+K,ia+wa),new mxPoint(oa,ia+wa-v),new mxPoint(B,ia+wa),new mxPoint(B,ia+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(oa,ia+
-v),new mxPoint(B+K,ia),new mxPoint(B+K,ia+wa-v),new mxPoint(oa,ia+wa),new mxPoint(B,ia+wa-v),new mxPoint(B,ia)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+K?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ia,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?J.prototype.fixedSize:J.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ia=c.y,K=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(oa,ia),new mxPoint(B+K,ia+v),new mxPoint(B+K,ia+wa-v),new mxPoint(oa,ia+wa),new mxPoint(B,ia+wa-v),new mxPoint(B,ia+v),new mxPoint(oa,ia)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,c),new mxPoint(B+K-v,ia+wa),new mxPoint(B+v,ia+wa),new mxPoint(B,c),new mxPoint(B+v,ia)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+K?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ia,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",P);mxUtils.extend(ma,mxShape);ma.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ma);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ia.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?aa.prototype.fixedSize:aa.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ja=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja),new mxPoint(B+J,ja+v),new mxPoint(B+
+J,ja+wa),new mxPoint(B,ja+wa-v),new mxPoint(B,ja)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B+v,ja),new mxPoint(B+J,ja),new mxPoint(B+J-v,ja+wa),new mxPoint(B,ja+wa),new mxPoint(B+v,ja)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ja,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ja=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B+v,ja),new mxPoint(B+J-v,ja),new mxPoint(B+J,ja+wa),new mxPoint(B,ja+wa),new mxPoint(B+
+v,ja)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja),new mxPoint(B+J,ja),new mxPoint(B+J-v,ja+wa),new mxPoint(B+v,ja+wa),new mxPoint(B,ja)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja+v),new mxPoint(B+J,ja),new mxPoint(B+J,ja+wa),new mxPoint(B,ja+wa-v),new mxPoint(B,ja+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja),new mxPoint(B+
+J,ja+v),new mxPoint(B+J,ja+wa-v),new mxPoint(B,ja+wa),new mxPoint(B,ja)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ja,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?V.prototype.fixedSize:V.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
+ja=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja),new mxPoint(B+J-v,ja),new mxPoint(B+J,c),new mxPoint(B+J-v,ja+wa),new mxPoint(B,ja+wa),new mxPoint(B+v,c),new mxPoint(B,ja)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
+A)),ja=[new mxPoint(B+v,ja),new mxPoint(B+J,ja),new mxPoint(B+J-v,c),new mxPoint(B+J,ja+wa),new mxPoint(B+v,ja+wa),new mxPoint(B,c),new mxPoint(B+v,ja)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja+v),new mxPoint(oa,ja),new mxPoint(B+J,ja+v),new mxPoint(B+J,ja+wa),new mxPoint(oa,ja+wa-v),new mxPoint(B,ja+wa),new mxPoint(B,ja+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ja=[new mxPoint(B,ja),new mxPoint(oa,ja+
+v),new mxPoint(B+J,ja),new mxPoint(B+J,ja+wa-v),new mxPoint(oa,ja+wa),new mxPoint(B,ja+wa-v),new mxPoint(B,ja)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ja,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?L.prototype.fixedSize:L.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
+c.x,ja=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ja=[new mxPoint(oa,ja),new mxPoint(B+J,ja+v),new mxPoint(B+J,ja+wa-v),new mxPoint(oa,ja+wa),new mxPoint(B,ja+wa-v),new mxPoint(B,ja+v),new mxPoint(oa,ja)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
+Math.min(1,A)),ja=[new mxPoint(B+v,ja),new mxPoint(B+J-v,ja),new mxPoint(B+J,c),new mxPoint(B+J-v,ja+wa),new mxPoint(B+v,ja+wa),new mxPoint(B,c),new mxPoint(B+v,ja)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ja,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.inset=2;R.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(ma,mxShape);ma.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ma);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(xa,mxCylinder);xa.prototype.jettyWidth=20;xa.prototype.jettyHeight=10;xa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ia=Math.min(l,v-l),K=Math.min(ia+2*l,v-l);A?(c.moveTo(x,ia),c.lineTo(B,ia),c.lineTo(B,ia+l),c.lineTo(x,ia+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ia+l),c.lineTo(0,ia+l),c.lineTo(0,ia),c.lineTo(x,ia),c.close());c.end()};mxCellRenderer.registerShape("module",xa);mxUtils.extend(ta,mxCylinder);ta.prototype.jettyWidth=
-32;ta.prototype.jettyHeight=12;ta.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ia=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,ia),c.lineTo(B,ia),c.lineTo(B,ia+l),c.lineTo(x,ia+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
-K),c.lineTo(x,ia+l),c.lineTo(0,ia+l),c.lineTo(0,ia),c.lineTo(x,ia),c.close());c.end()};mxCellRenderer.registerShape("component",ta);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ia=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ia,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+this.jettyHeight));x=B/2;B=x+B/2;var ja=Math.min(l,v-l),J=Math.min(ja+2*l,v-l);A?(c.moveTo(x,ja),c.lineTo(B,ja),c.lineTo(B,ja+l),c.lineTo(x,ja+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ja+l),c.lineTo(0,ja+l),c.lineTo(0,ja),c.lineTo(x,ja),c.close());c.end()};mxCellRenderer.registerShape("module",xa);mxUtils.extend(ta,mxCylinder);ta.prototype.jettyWidth=
+32;ta.prototype.jettyHeight=12;ta.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ja=.3*v-l/2,J=.7*v-l/2;A?(c.moveTo(x,ja),c.lineTo(B,ja),c.lineTo(B,ja+l),c.lineTo(x,ja+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,
+J),c.lineTo(x,ja+l),c.lineTo(0,ja+l),c.lineTo(0,ja),c.lineTo(x,ja),c.close());c.end()};mxCellRenderer.registerShape("component",ta);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ja=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ja,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.registerShape("associativeEntity",Aa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ba,Ca);Ba.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ba);mxUtils.extend(sa,mxArrowConnector);
-sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Oa,mxArrowConnector);Oa.prototype.defaultWidth=10;Oa.prototype.defaultArrowWidth=20;Oa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Oa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Oa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=30;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ta);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend($a,mxActor);$a.prototype.dx=20;$a.prototype.dy=20;$a.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",$a);mxUtils.extend(Ga,mxActor);Ga.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ga);mxUtils.extend(eb,mxActor);eb.prototype.dx=20;eb.prototype.dy=20;eb.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Pa,mxArrowConnector);Pa.prototype.defaultWidth=10;Pa.prototype.defaultArrowWidth=20;Pa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Pa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=30;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ta);mxUtils.extend(Oa,mxRectangleShape);Oa.prototype.dx=20;Oa.prototype.dy=20;Oa.prototype.isHtmlAllowed=function(){return!1};Oa.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Oa);
+mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
+new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Ga,mxActor);Ga.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ga);mxUtils.extend(eb,mxActor);eb.prototype.dx=20;eb.prototype.dy=20;eb.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",eb);mxUtils.extend(bb,
mxActor);bb.prototype.arrowWidth=.3;bb.prototype.arrowSize=.2;bb.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",bb);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",bb.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",bb.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
-l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
-.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",X);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
-v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(K,mxActor);K.prototype.size=.1;K.prototype.fixedSize=20;K.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
+l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
+.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
+v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ua);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(za,mxRhombus);za.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",za);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ia=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ia);c.lineTo(l+A+B,ia-B/2);c.moveTo(l+A,ia);c.lineTo(l+A+B,ia+B/2);c.moveTo(l+A,ia);c.lineTo(l+p-A,ia);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ia);c.lineTo(l+p-B-A,ia-B/2);c.moveTo(l+
-p-A,ia);c.lineTo(l+p-B-A,ia+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(La,mxEllipse);La.prototype.drawHidden=!0;La.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ia="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ia||wa||oa||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ia?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",La);mxUtils.extend(Ua,mxEllipse);Ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ua);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(c,
-l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ra);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.2;Fa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
+c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ja=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ja);c.lineTo(l+A+B,ja-B/2);c.moveTo(l+A,ja);c.lineTo(l+A+B,ja+B/2);c.moveTo(l+A,ja);c.lineTo(l+p-A,ja);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ja);c.lineTo(l+p-B-A,ja-B/2);c.moveTo(l+
+p-A,ja);c.lineTo(l+p-B-A,ja+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(La,mxEllipse);La.prototype.drawHidden=!0;La.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ja="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ja||wa||oa||J?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ja?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||J)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",La);mxUtils.extend(Ua,mxEllipse);Ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ua);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
+l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.2;Fa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(va,mxActor);va.prototype.size=.25;va.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",va);mxUtils.extend(ya,
mxActor);ya.prototype.cst={RECT2:"mxgraph.basic.rect"};ya.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];ya.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};ya.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ia=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Za=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),hb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Qa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Xa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+x);this.strictDrawShape(c,0,0,p,v)};ya.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ja=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),hb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ya=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,K));A=ya.prototype;c.setDashed(Za);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ia||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ia||(oa=Math.min(hb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-K);(Ea||Ka||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Qa,K,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),Ka&&A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),Za=ia=Hb,"none"==Cb&&(ia=0),"none"==Db&&(Za=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ia,Za),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
-l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),Ka&&Ea&&A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Qa,Va,Wa,Xa,K,Ea,Ka,Ia,Ha),c.stroke()));Ea||Ka||Ia||!Ha?Ea||Ka||!Ia||Ha?!Ea&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),"double"==
-wa&&(A.moveNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),c.close(),
-c.fillAndStroke()):Ea||!Ka||Ia||Ha?!Ea&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Qa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Qa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,
-K,Ea),A.lineNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),"double"==wa&&(A.moveSWInner(c,
-l,x,p,v,B,Xa,K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.lineSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&
-Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea||Ka||Ia||Ha?
-Ea&&!Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.lineNEInner(c,
-l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Xa,
-K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.lineNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.lineSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,
-K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,
-x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.lineNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,
-l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,
-l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,
-l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,
-v,B,Xa,K,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,
-l,x,p,v,B,Qa,K,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.lineSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),c.close(),c.fillAndStroke()):
-Ea&&Ka&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,
-B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.paintNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.paintSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.paintSW(c,l,x,p,v,B,Xa,K,Ia),
-A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Xa,K,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,K,oa),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,K,oa),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Qa,K,oa),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,
-l,x,p,v,B,Va,K,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Qa,K,Ha),A.paintTop(c,l,x,p,v,B,Va,K,Ka),A.lineNEInner(c,l,x,p,v,B,Va,K,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Qa,K,oa,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Va,K,Ea),A.paintRight(c,l,x,p,v,B,Wa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,K,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,K,oa,Ea,Ka),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,K,Ka),A.paintBottom(c,l,x,p,v,B,Xa,K,Ha),A.lineSWInner(c,l,x,p,v,B,Xa,K,oa,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Wa,K,oa,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Qa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Qa,K,Ia),A.paintLeft(c,l,x,p,v,B,Qa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Qa,K,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Xa,K,oa,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Qa,Va,
-Wa,Xa,K,Ea,Ka,Ia,Ha);c.stroke()};ya.prototype.moveNW=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ia)};ya.prototype.moveNE=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ia,0)};ya.prototype.moveSE=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ia)};ya.prototype.moveSW=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-v):c.moveTo(ia,v)};ya.prototype.paintNW=function(c,l,x,p,v,A,B,ia,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ia,ia,0,0,l,ia,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ia,0);else c.lineTo(0,0)};ya.prototype.paintTop=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ia,0)};ya.prototype.paintNE=
-function(c,l,x,p,v,A,B,ia,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ia,ia,0,0,l,p,ia)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ia);else c.lineTo(p,0)};ya.prototype.paintRight=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ia)};ya.prototype.paintLeft=function(c,l,x,p,v,A,B,ia,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ia)};ya.prototype.paintSE=function(c,l,x,p,v,A,B,ia,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ia,ia,0,0,l,p-ia,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ia,v);else c.lineTo(p,v)};ya.prototype.paintBottom=function(c,l,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-v):c.lineTo(ia,v)};ya.prototype.paintSW=function(c,l,x,p,v,A,B,ia,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ia,ia,0,0,l,0,v-ia)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ia);else c.lineTo(0,v)};ya.prototype.paintNWInner=function(c,l,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,K,.5*K+ia);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,K,K+ia);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ia);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ia,K+ia),c.lineTo(K,K+ia)};ya.prototype.paintTopInner=function(c,l,x,p,v,A,B,ia,K,wa,oa){wa||oa?!wa&&oa?c.lineTo(0,K):wa&&!oa?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ia+.5*K,K):c.lineTo(ia+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};ya.prototype.paintNEInner=function(c,l,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,p-ia-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,p-ia-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ia-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ia-K,ia+K),c.lineTo(p-ia-K,K)};ya.prototype.paintRightInner=function(c,l,x,p,v,A,B,ia,K,wa,oa){wa||oa?!wa&&oa?c.lineTo(p-K,0):wa&&!oa?c.lineTo(p,
-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ia+.5*K):c.lineTo(p-K,ia+K):c.lineTo(p-K,0):c.lineTo(p,0)};ya.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ia,K,wa,oa){wa||oa?!wa&&oa?c.lineTo(K,v):wa&&!oa?c.lineTo(0,v-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ia-.5*K):c.lineTo(K,v-ia-K):
-c.lineTo(K,v):c.lineTo(0,v)};ya.prototype.paintSEInner=function(c,l,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,p-K,v-ia-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,p-K,v-ia-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ia-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ia-K,v-ia-K),c.lineTo(p-K,v-ia-K)};ya.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ia,K,wa,oa){wa||oa?!wa&&oa?c.lineTo(p,
-v-K):wa&&!oa?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ia-.5*K,v-K):c.lineTo(p-ia-K,v-K):c.lineTo(p,v)};ya.prototype.paintSWInner=function(c,l,x,p,v,A,B,ia,K,wa){if(!wa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,ia+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ia+K,ia+K,0,0,1,ia+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ia+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ia,v-ia-K),c.lineTo(K+ia,v-K)};ya.prototype.moveSWInner=function(c,l,x,p,v,A,B,ia,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ia-K):
-c.moveTo(0,v-K)};ya.prototype.lineSWInner=function(c,l,x,p,v,A,B,ia,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ia-K):c.lineTo(0,v-K)};ya.prototype.moveSEInner=function(c,l,x,p,v,A,B,ia,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ia-K):c.moveTo(p-K,v)};ya.prototype.lineSEInner=function(c,l,x,p,v,A,B,ia,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ia-K):
-c.lineTo(p-K,v)};ya.prototype.moveNEInner=function(c,l,x,p,v,A,B,ia,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ia+K):c.moveTo(p,K)};ya.prototype.lineNEInner=function(c,l,x,p,v,A,B,ia,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ia+K):c.lineTo(p,K)};ya.prototype.moveNWInner=function(c,l,x,p,v,A,B,ia,K,wa,oa){wa||oa?!wa&&oa?c.moveTo(K,0):wa&&!oa?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ia+K):c.moveTo(0,0)};ya.prototype.lineNWInner=function(c,l,x,p,v,A,B,ia,K,wa,oa){wa||oa?!wa&&oa?c.lineTo(K,0):wa&&!oa?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ia+K):c.lineTo(0,0)};ya.prototype.paintFolds=function(c,l,x,p,v,A,B,ia,K,wa,oa,Za,jb,hb,Ea){if("fold"==
-A||"fold"==B||"fold"==ia||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Za&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ia||"default"==ia&&"fold"==A)&&Za&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==K||"default"==K&&"fold"==A)&&hb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==wa||"default"==wa&&"fold"==A)&&hb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(ya.prototype.cst.RECT2,ya);
+Ib=Math.max(0,Math.min(50,J));A=ya.prototype;c.setDashed($a);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ja||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ja||(oa=Math.min(hb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ea||Ka||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Ra,J,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),Ka&&A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),Ia&&
+A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),$a=ja=Hb,"none"==Cb&&(ja=0),"none"==Db&&($a=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ja,$a),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
+l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),Ka&&Ea&&A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ra,Va,Wa,Ya,J,Ea,Ka,Ia,Ha),c.stroke()));Ea||Ka||Ia||!Ha?Ea||Ka||!Ia||Ha?!Ea&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==
+wa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),
+c.fillAndStroke()):Ea||!Ka||Ia||Ha?!Ea&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,
+J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==wa&&(A.moveSWInner(c,
+l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&
+Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea||Ka||Ia||Ha?
+Ea&&!Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,
+l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Ya,
+J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,
+J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,
+x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,
+l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,
+l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,
+l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,
+v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&Ka&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,
+l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):
+Ea&&Ka&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,
+B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),
+A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,
+l,x,p,v,B,Va,J,Ka),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),
+A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Va,
+Wa,Ya,J,Ea,Ka,Ia,Ha);c.stroke()};ya.prototype.moveNW=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ja)};ya.prototype.moveNE=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ja,0)};ya.prototype.moveSE=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ja)};ya.prototype.moveSW=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
+v):c.moveTo(ja,v)};ya.prototype.paintNW=function(c,l,x,p,v,A,B,ja,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ja,ja,0,0,l,ja,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ja,0);else c.lineTo(0,0)};ya.prototype.paintTop=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ja,0)};ya.prototype.paintNE=
+function(c,l,x,p,v,A,B,ja,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ja,ja,0,0,l,p,ja)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ja);else c.lineTo(p,0)};ya.prototype.paintRight=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ja)};ya.prototype.paintLeft=function(c,l,x,p,v,A,B,ja,J){"square"==
+B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ja)};ya.prototype.paintSE=function(c,l,x,p,v,A,B,ja,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ja,ja,0,0,l,p-ja,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ja,v);else c.lineTo(p,v)};ya.prototype.paintBottom=function(c,l,x,p,v,A,B,ja,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
+v):c.lineTo(ja,v)};ya.prototype.paintSW=function(c,l,x,p,v,A,B,ja,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ja,ja,0,0,l,0,v-ja)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ja);else c.lineTo(0,v)};ya.prototype.paintNWInner=function(c,l,x,p,v,A,B,ja,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ja-.5*J,ja-.5*J,0,0,0,J,.5*J+ja);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ja+J,ja+J,0,0,1,J,J+ja);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ja);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ja,J+ja),c.lineTo(J,J+ja)};ya.prototype.paintTopInner=function(c,l,x,p,v,A,B,ja,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(0,J):wa&&!oa?c.lineTo(J,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ja+.5*J,J):c.lineTo(ja+J,J):c.lineTo(0,
+J):c.lineTo(0,0)};ya.prototype.paintNEInner=function(c,l,x,p,v,A,B,ja,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ja-.5*J,ja-.5*J,0,0,0,p-ja-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ja+J,ja+J,0,0,1,p-ja-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ja-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ja-J,ja+J),c.lineTo(p-ja-J,J)};ya.prototype.paintRightInner=function(c,l,x,p,v,A,B,ja,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p-J,0):wa&&!oa?c.lineTo(p,
+J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ja+.5*J):c.lineTo(p-J,ja+J):c.lineTo(p-J,0):c.lineTo(p,0)};ya.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ja,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,v):wa&&!oa?c.lineTo(0,v-J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ja-.5*J):c.lineTo(J,v-ja-J):
+c.lineTo(J,v):c.lineTo(0,v)};ya.prototype.paintSEInner=function(c,l,x,p,v,A,B,ja,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ja-.5*J,ja-.5*J,0,0,0,p-J,v-ja-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ja+J,ja+J,0,0,1,p-J,v-ja-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ja-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ja-J,v-ja-J),c.lineTo(p-J,v-ja-J)};ya.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ja,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p,
+v-J):wa&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ja-.5*J,v-J):c.lineTo(p-ja-J,v-J):c.lineTo(p,v)};ya.prototype.paintSWInner=function(c,l,x,p,v,A,B,ja,J,wa){if(!wa)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ja-.5*J,ja-.5*J,0,0,0,ja+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ja+J,ja+J,0,0,1,ja+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ja+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ja,v-ja-J),c.lineTo(J+ja,v-J)};ya.prototype.moveSWInner=function(c,l,x,p,v,A,B,ja,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ja-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ja-J):
+c.moveTo(0,v-J)};ya.prototype.lineSWInner=function(c,l,x,p,v,A,B,ja,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ja-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ja-J):c.lineTo(0,v-J)};ya.prototype.moveSEInner=function(c,l,x,p,v,A,B,ja,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ja-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ja-J):c.moveTo(p-J,v)};ya.prototype.lineSEInner=function(c,l,x,p,v,A,B,ja,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ja-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ja-J):
+c.lineTo(p-J,v)};ya.prototype.moveNEInner=function(c,l,x,p,v,A,B,ja,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ja+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ja+J):c.moveTo(p,J)};ya.prototype.lineNEInner=function(c,l,x,p,v,A,B,ja,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ja+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ja+J):c.lineTo(p,J)};ya.prototype.moveNWInner=function(c,l,x,p,v,A,B,ja,J,wa,oa){wa||oa?!wa&&oa?c.moveTo(J,0):wa&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ja+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(J,ja+J):c.moveTo(0,0)};ya.prototype.lineNWInner=function(c,l,x,p,v,A,B,ja,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,0):wa&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ja+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ja+J):c.lineTo(0,0)};ya.prototype.paintFolds=function(c,l,x,p,v,A,B,ja,J,wa,oa,$a,jb,hb,Ea){if("fold"==
+A||"fold"==B||"fold"==ja||"fold"==J||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&$a&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ja||"default"==ja&&"fold"==A)&&$a&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&hb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==wa||"default"==wa&&"fold"==A)&&hb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(ya.prototype.cst.RECT2,ya);
ya.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Na.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ia,K,wa){var oa=v*(B+K+1),Za=A*(B+K+1);return function(){c.begin();
-c.moveTo(p.x-oa/2-Za/2,p.y-Za/2+oa/2);c.lineTo(p.x+Za/2-3*oa/2,p.y-3*Za/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ia,K,wa){var oa=v*(B+K+1),Za=A*(B+K+1),jb=p.x+oa/2,hb=p.y+Za/2;p.x-=oa;p.y-=Za;return function(){c.begin();c.moveTo(jb-oa/2-Za/2,hb-Za/2+oa/2);c.lineTo(jb-oa/2+Za/2,hb-Za/2-oa/2);c.lineTo(jb+Za/2-3*oa/2,hb-3*Za/2-oa/2);c.lineTo(jb-Za/2-3*oa/2,hb-3*Za/2+oa/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ia,K,
-wa){var oa=v*(B+K+1),Za=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-oa/2-Za/2,p.y-Za/2+oa/2);c.lineTo(p.x+Za/2-3*oa/2,p.y-3*Za/2-oa/2);c.moveTo(p.x-oa/2+Za/2,p.y-Za/2-oa/2);c.lineTo(p.x-Za/2-3*oa/2,p.y-3*Za/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Ja);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ia,K,wa){var oa=p.clone(),Za=Ja.apply(this,arguments),jb=v*(B+2*K),hb=A*(B+2*K);return function(){Za.apply(this,arguments);c.begin();c.moveTo(oa.x-v*K,oa.y-A*K);c.lineTo(oa.x-2*jb+
-v*K,oa.y-2*hb+A*K);c.moveTo(oa.x-jb-hb+A*K,oa.y-hb+jb-v*K);c.lineTo(oa.x+hb-jb-A*K,oa.y-hb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ia,K,wa){var oa=v*(B+K+1),Za=A*(B+K+1),jb=p.clone();p.x-=oa;p.y-=Za;return function(){c.begin();c.moveTo(jb.x-Za,jb.y+oa);c.quadTo(p.x-Za,p.y+oa,p.x,p.y);c.quadTo(p.x+Za,p.y-oa,jb.x+Za,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ia,K,wa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var oa=p.clone();oa.x-=l;oa.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ia?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ia,K,wa,oa){A*=ia+wa;B*=ia+wa;var Za=v.clone();return function(){l.begin();l.moveTo(Za.x,Za.y);K?l.lineTo(Za.x-A-B/c,Za.y-B+A/c):l.lineTo(Za.x+B/c-A,Za.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
-function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ia){ia=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ia/2,B.y+A*p/4-v*ia/2)},function(p,v,A,B,ia,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return gb(c,l,function(A){var B=c.absolutePoints,ia=B.length-1;A=c.view.translate;var K=c.view.scale,wa=x?B[0]:B[ia];B=x?B[1]:B[ia-1];ia=B.x-wa.x;var oa=B.y-wa.y,Za=Math.sqrt(ia*ia+oa*oa);wa=
-p.call(this,Za,ia/Za,oa/Za,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ia){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var oa=c.view.scale,Za=x?K[0]:K[wa];K=x?K[1]:K[wa-1];wa=K.x-Za.x;var jb=K.y-Za.y,hb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,hb,wa/hb,jb/hb,Za,K,B,ia)})},nb=function(c){return function(l){return[gb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",bb.prototype.arrowWidth))),
+[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ja,J,wa){var oa=v*(B+J+1),$a=A*(B+J+1);return function(){c.begin();
+c.moveTo(p.x-oa/2-$a/2,p.y-$a/2+oa/2);c.lineTo(p.x+$a/2-3*oa/2,p.y-3*$a/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ja,J,wa){var oa=v*(B+J+1),$a=A*(B+J+1),jb=p.x+oa/2,hb=p.y+$a/2;p.x-=oa;p.y-=$a;return function(){c.begin();c.moveTo(jb-oa/2-$a/2,hb-$a/2+oa/2);c.lineTo(jb-oa/2+$a/2,hb-$a/2-oa/2);c.lineTo(jb+$a/2-3*oa/2,hb-3*$a/2-oa/2);c.lineTo(jb-$a/2-3*oa/2,hb-3*$a/2+oa/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ja,J,
+wa){var oa=v*(B+J+1),$a=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-$a/2,p.y-$a/2+oa/2);c.lineTo(p.x+$a/2-3*oa/2,p.y-3*$a/2-oa/2);c.moveTo(p.x-oa/2+$a/2,p.y-$a/2-oa/2);c.lineTo(p.x-$a/2-3*oa/2,p.y-3*$a/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Ja);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ja,J,wa){var oa=p.clone(),$a=Ja.apply(this,arguments),jb=v*(B+2*J),hb=A*(B+2*J);return function(){$a.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*jb+
+v*J,oa.y-2*hb+A*J);c.moveTo(oa.x-jb-hb+A*J,oa.y-hb+jb-v*J);c.lineTo(oa.x+hb-jb-A*J,oa.y-hb-jb+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ja,J,wa){var oa=v*(B+J+1),$a=A*(B+J+1),jb=p.clone();p.x-=oa;p.y-=$a;return function(){c.begin();c.moveTo(jb.x-$a,jb.y+oa);c.quadTo(p.x-$a,p.y+oa,p.x,p.y);c.quadTo(p.x+$a,p.y-oa,jb.x+$a,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ja,J,wa){l=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=l;oa.y-=
+x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ja?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ja,J,wa,oa){A*=ja+wa;B*=ja+wa;var $a=v.clone();return function(){l.begin();l.moveTo($a.x,$a.y);J?l.lineTo($a.x-A-B/c,$a.y-B+A/c):l.lineTo($a.x+B/c-A,$a.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
+function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ja){ja=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ja/2,B.y+A*p/4-v*ja/2)},function(p,v,A,B,ja,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ja.x,ja.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return gb(c,l,function(A){var B=c.absolutePoints,ja=B.length-1;A=c.view.translate;var J=c.view.scale,wa=x?B[0]:B[ja];B=x?B[1]:B[ja-1];ja=B.x-wa.x;var oa=B.y-wa.y,$a=Math.sqrt(ja*ja+oa*oa);wa=
+p.call(this,$a,ja/$a,oa/$a,wa,B);return new mxPoint(wa.x/J-A.x,wa.y/J-A.y)},function(A,B,ja){var J=c.absolutePoints,wa=J.length-1;A=c.view.translate;var oa=c.view.scale,$a=x?J[0]:J[wa];J=x?J[1]:J[wa-1];wa=J.x-$a.x;var jb=J.y-$a.y,hb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,hb,wa/hb,jb/hb,$a,J,B,ja)})},ob=function(c){return function(l){return[gb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",bb.prototype.arrowWidth))),
v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",bb.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[gb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},mb=function(c,l,x){return function(p){var v=[gb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(ob(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[gb(A,["size"],function(ia){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ia.x+Math.max(0,Math.min(.5*ia.width,wa*(K?1:ia.width))),ia.getCenterY())},function(ia,K,wa){ia=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ia.x:Math.max(0,Math.min(x,(K.x-ia.x)/ia.width));this.state.style.size=
-ia},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(ob(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ia=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ia*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(ob(p));return v}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ob(c));return l}},ob=function(c,l){return gb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},nb=function(c,l,x){return function(p){var v=[gb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(pb(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[gb(A,["size"],function(ja){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ja.x+Math.max(0,Math.min(.5*ja.width,wa*(J?1:ja.width))),ja.getCenterY())},function(ja,J,wa){ja=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ja.x:Math.max(0,Math.min(x,(J.x-ja.x)/ja.width));this.state.style.size=
+ja},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(pb(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ja=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ja*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(pb(p));return v}},mb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l}},pb=function(c,l){return gb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},gb=function(c,l,x,p,v,A,B){var ia=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ia.execute=function(wa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(wa)};ia.getPosition=x;ia.setPosition=p;ia.ignoreGrid=null!=v?v:!0;if(A){var K=ia.positionChanged;ia.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ia},rb={link:function(c){return[kb(c,!0,10),kb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ia){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
-return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ia,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ia){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ia,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},gb=function(c,l,x,p,v,A,B){var ja=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ja.execute=function(wa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(wa)};ja.getPosition=x;ja.setPosition=p;ja.ignoreGrid=null!=v?v:!0;if(A){var J=ja.positionChanged;ja.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ja},rb={link:function(c){return[kb(c,!0,10),kb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ja){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ja=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+return new mxPoint(B.x+v*(ja+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ja+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ja,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ja.x,ja.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ja){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ja=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(ja+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ja+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ja,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ja.x,ja.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ia){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ia,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ja){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ja=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ja+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ja+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ja,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ja.x,ja.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ia){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ia,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
-B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ob(c,x/2))}l.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ja){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ja=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ja+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ja+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ja,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ja.x,ja.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
+B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(pb(c,x/2))}l.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ia=0;ia<A.length;ia++)A[ia]!=c.cell&&v.isSwimlane(A[ia])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ia]))==p&&B.push(A[ia]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:lb(),ext:lb(),rectangle:lb(),
-triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(l){var x=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),
-p=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[gb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ob(c));return l},cross:function(c){return[gb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ja=0;ja<A.length;ja++)A[ja]!=c.cell&&v.isSwimlane(A[ja])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ja]))==p&&B.push(A[ja]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:mb(),ext:mb(),rectangle:mb(),
+triangle:mb(),rhombus:mb(),umlLifeline:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(l){var x=Math.max(S.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",S.prototype.width))),
+p=Math.max(1.5*S.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",S.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(S.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*S.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[gb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",fa.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},cross:function(c){return[gb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"size",Fa.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[gb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ob(c));return l},dataStorage:function(c){return[gb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
-L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[gb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ob(c));return l},internalStorage:function(c){var l=[gb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Sa.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ob(c));return l},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",xa.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",xa.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",$a.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",$a.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},dataStorage:function(c){return[gb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
+K.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[gb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ia.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ia.prototype.position)));mxUtils.getValue(this.state.style,"base",ia.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ia.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ia.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ia.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ia.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ia.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},internalStorage:function(c){var l=[gb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Oa.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Oa.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",xa.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
+mxUtils.getValue(this.state.style,"jettyHeight",xa.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
+"dy",Xa.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:ob(1),doubleArrow:ob(.5),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",ca.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));
+"size",ca.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(V.prototype.size,!0,null,!0,V.prototype.fixedSize),hexagon:Bb(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:Bb(qa.prototype.size,!1),display:Bb(va.prototype.size,!1),cube:mb(1,
-n.prototype.size,!1),card:mb(.5,G.prototype.size,!0),loopLimit:mb(.5,X.prototype.size,!0),trapezoid:yb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:yb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(V.prototype.size,!0,null,!0,V.prototype.fixedSize),hexagon:Bb(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:Bb(qa.prototype.size,!1),display:Bb(va.prototype.size,!1),cube:nb(1,
+n.prototype.size,!1),card:nb(.5,G.prototype.size,!0),loopLimit:nb(.5,W.prototype.size,!0),trapezoid:yb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:yb(1,aa.prototype.size,aa.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=rb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=rb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var zb=new mxPoint(1,0),wb=new mxPoint(1,0),Ab=mxUtils.toRadians(-30);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));var pb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(pb),Math.sin(pb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ia=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ia&&null!=l&&(ia=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=zb.x,wa=zb.y,oa=wb.x,Za=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ia){c=function(Ea,Ka,Ia){Ea-=hb.x;var Ha=Ka-hb.y;Ka=(Za*Ea-oa*Ha)/(K*Za-wa*oa);Ea=(wa*Ea-K*Ha)/(wa*oa-K*Za);jb?(Ia&&(hb=new mxPoint(hb.x+K*Ka,hb.y+wa*Ka),v.push(hb)),hb=new mxPoint(hb.x+oa*Ea,hb.y+Za*Ea)):(Ia&&(hb=new mxPoint(hb.x+oa*Ea,hb.y+Za*Ea),v.push(hb)),
-hb=new mxPoint(hb.x+K*Ka,hb.y+wa*Ka));v.push(hb)};var hb=ia;null==p&&(p=new mxPoint(ia.x+(B.x-ia.x)/2,ia.y+(B.y-ia.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var zb=new mxPoint(1,0),wb=new mxPoint(1,0),Ab=mxUtils.toRadians(-30);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));var lb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ja=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ja&&null!=l&&(ja=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,wa=zb.y,oa=wb.x,$a=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ja){c=function(Ea,Ka,Ia){Ea-=hb.x;var Ha=Ka-hb.y;Ka=($a*Ea-oa*Ha)/(J*$a-wa*oa);Ea=(wa*Ea-J*Ha)/(wa*oa-J*$a);jb?(Ia&&(hb=new mxPoint(hb.x+J*Ka,hb.y+wa*Ka),v.push(hb)),hb=new mxPoint(hb.x+oa*Ea,hb.y+$a*Ea)):(Ia&&(hb=new mxPoint(hb.x+oa*Ea,hb.y+$a*Ea),v.push(hb)),
+hb=new mxPoint(hb.x+J*Ka,hb.y+wa*Ka));v.push(hb)};var hb=ja;null==p&&(p=new mxPoint(ja.x+(B.x-ja.x)/2,ja.y+(B.y-ja.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ia.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),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(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!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),!0),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)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];La.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
@@ -2898,27 +2899,27 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;
-pa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxEllipse.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Oa.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;
+pa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxEllipse.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};xa.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
"jettyWidth",xa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",xa.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),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,l),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(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};X.prototype.constraints=mxRectangleShape.prototype.constraints;fa.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)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};W.prototype.constraints=mxRectangleShape.prototype.constraints;ha.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ta.prototype.constraints=[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(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!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(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];V.prototype.constraints=[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(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!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(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];aa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=[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(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;eb.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};$a.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Xa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];bb.prototype.getConstraints=
function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
@@ -2937,7 +2938,7 @@ window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.pa
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(y){if(null!=y){for(var F=!0,C=0;C<
-y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,aa=I.y;I=null;if(1==y.length&&F){var ca=t.getCellGeometry(y[0]);null!=ca&&(I=ca.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(y,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-aa)),t.cellsMoved(y,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Z=I.y;I=null;if(1==y.length&&F){var ca=t.getCellGeometry(y[0]);null!=ca&&(I=ca.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(y,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Z)),t.cellsMoved(y,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{m(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,I){var G=y.getValue(C);I=C.cloneValue(I);I.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||I.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||I.setAttribute("label",t.convertValueToString(C));y.setValue(C,I)}g=null!=m?m:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
@@ -2986,9 +2987,9 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function
t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));m.addPointAt(m.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
-q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,aa,ca,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var Z=t.getSelectionCells();if(null!=C&&(0<C.length||0<Z.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Z.length){Z=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var N=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Z,!0));Z[0].geometry.x=N.x;Z[0].geometry.y=N.y;null!=aa&&k(Z[0],aa,ca,ba,t);qa=Z;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Z);var Y=t.getCurrentCellStyle(Z[0]);"image"!=Y[mxConstants.STYLE_SHAPE]&&"label"!=Y[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Z):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Z);if(1==t.getSelectionCount()&&
-null!=I&&null!=G){var ea=Z[0],ka=t.getModel().getGeometry(ea);null!=ka&&(ka=ka.clone(),ka.width=I,ka.height=G,t.getModel().setGeometry(ea,ka));null!=aa?k(ea,aa,ca,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Z)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Z,ca,aa){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var qa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var Q=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=Q.x;Y[0].geometry.y=Q.y;null!=Z&&k(Y[0],Z,ca,aa,t);qa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var X=t.getCurrentCellStyle(Y[0]);"image"!=X[mxConstants.STYLE_SHAPE]&&"label"!=X[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
+null!=I&&null!=G){var fa=Y[0],ka=t.getModel().getGeometry(fa);null!=ka&&(ka=ka.clone(),ka.width=I,ka.height=G,t.getModel().setGeometry(fa,ka));null!=Z?k(fa,Z,ca,aa,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],y=m[mxConstants.STYLE_SHAPE];q&&"image"==y&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(F,C,I){k(g,F,C,I,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
@@ -3004,7 +3005,7 @@ e))}catch(t){null!=e&&e(t)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),I=this.ui.hashValue(this.getCurrentEtag());
this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+I+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(ba){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(ba);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,ba);else{var aa=this.getCurrentUser(),ca=null!=aa?aa.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ca,ba)}}catch(Z){}}};
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(aa){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(aa);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,aa);else{var Z=this.getCurrentUser(),ca=null!=Z?Z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ca,aa)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,k,n,D){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!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(g){var m=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
@@ -3121,103 +3122,103 @@ H){u=H.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.lengt
{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,H){return H.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,H){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,
-H){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=u&&(H.isSwimlane(u)||0<H.model.getChildCount(u))},isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,H){var O=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=O&&(H.isContainer(O)&&"0"!=u.style.collapsible||!H.isContainer(O)&&"1"==u.style.collapsible)},
+H){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=u&&(H.isSwimlane(u)||0<H.model.getChildCount(u))},isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,H){var P=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=P&&(H.isContainer(P)&&"0"!=u.style.collapsible||!H.isContainer(P)&&"1"==u.style.collapsible)},
isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length&&!H.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(u,H){H=H.editorUi.editor.graph.model;return 0<u.vertices.length?
H.isVertex(H.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,H){u=0<u.vertices.length?H.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},
-{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,H){var O=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return H.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==O||O==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||
+{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,H){var P=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return H.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==P||P==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||
null!=u.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,H){return 0<u.vertices.length&&H.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(O){var T=O.sets||[];O=O.options||this.getDefaultOptions();for(var R=0;R<T.length;R++){var da=T[R];switch(da.type){case "path":null!=O.stroke&&this._drawToContext(u,da,O);break;case "fillPath":this._drawToContext(u,da,O);break;case "fillSketch":this.fillSketch(u,da,O)}}};H.fillSketch=function(O,T,R){var da=u.state.strokeColor,P=u.state.strokeWidth,ma=u.state.strokeAlpha,ra=u.state.dashed,xa=R.fillWeight;
-0>xa&&(xa=R.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(R.fill||"");u.setStrokeWidth(xa);u.setDashed(!1);this._drawToContext(O,T,R);u.setDashed(ra);u.setStrokeWidth(P);u.setStrokeColor(da);u.setStrokeAlpha(ma)};H._drawToContext=function(O,T,R){O.begin();for(var da=0;da<T.ops.length;da++){var P=T.ops[da],ma=P.data;switch(P.op){case "move":O.moveTo(ma[0],ma[1]);break;case "bcurveTo":O.curveTo(ma[0],ma[1],ma[2],ma[3],ma[4],ma[5]);break;case "lineTo":O.lineTo(ma[0],ma[1])}}O.end();
-"fillPath"===T.type&&R.filled?O.fill():O.stroke()};return H};(function(){function u(da,P,ma){this.canvas=da;this.rc=P;this.shape=ma;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(P){var T=P.sets||[];P=P.options||this.getDefaultOptions();for(var S=0;S<T.length;S++){var da=T[S];switch(da.type){case "path":null!=P.stroke&&this._drawToContext(u,da,P);break;case "fillPath":this._drawToContext(u,da,P);break;case "fillSketch":this.fillSketch(u,da,P)}}};H.fillSketch=function(P,T,S){var da=u.state.strokeColor,R=u.state.strokeWidth,ma=u.state.strokeAlpha,ra=u.state.dashed,xa=S.fillWeight;
+0>xa&&(xa=S.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(S.fill||"");u.setStrokeWidth(xa);u.setDashed(!1);this._drawToContext(P,T,S);u.setDashed(ra);u.setStrokeWidth(R);u.setStrokeColor(da);u.setStrokeAlpha(ma)};H._drawToContext=function(P,T,S){P.begin();for(var da=0;da<T.ops.length;da++){var R=T.ops[da],ma=R.data;switch(R.op){case "move":P.moveTo(ma[0],ma[1]);break;case "bcurveTo":P.curveTo(ma[0],ma[1],ma[2],ma[3],ma[4],ma[5]);break;case "lineTo":P.lineTo(ma[0],ma[1])}}P.end();
+"fillPath"===T.type&&S.filled?P.fill():P.stroke()};return H};(function(){function u(da,R,ma){this.canvas=da;this.rc=R;this.shape=ma;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
this.canvas.roundrect=mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(da,P){var ma=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var xa=0;xa<ra.length;xa++)ma=(ma<<5)-ma+ra.charCodeAt(xa)<<0}ma={strokeWidth:this.canvas.state.strokeWidth,seed:ma,preserveVertices:!0};ra=this.rc.getDefaultOptions();ma.stroke=da?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;da=null;(ma.filled=P)?(ma.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,da=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ma.fill="";ma.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);ma.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);ma.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-ra.curveFitting);ma.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);ma.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);ma.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);ma.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);P=mxUtils.getValue(this.shape.style,"hachureGap",-1);ma.hachureGap="auto"==P?-1:P;ma.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",P);ma.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",P);ma.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",P);P=mxUtils.getValue(this.shape.style,"fillWeight",-1);ma.fillWeight="auto"==P?-1:P;P=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==P&&(P=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),P=null!=ma.fill&&(null!=da||null!=P&&ma.fill==P)?"solid":ra.fillStyle);
-ma.fillStyle=P;return ma};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var da=2;da<arguments.length;da+=2)this.lastX=arguments[da-1],this.lastY=arguments[da],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-u.prototype.lineTo=function(da,P){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,da,P),this.lastX=da,this.lastY=P)};u.prototype.moveTo=function(da,P){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,da,P),this.lastX=da,this.lastY=P,this.firstX=da,this.firstY=P)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(da,P,ma,
-ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,da,P,ma,ra),this.lastX=ma,this.lastY=ra)};u.prototype.curveTo=function(da,P,ma,ra,xa,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,da,P,ma,ra,xa,ta),this.lastX=xa,this.lastY=ta)};u.prototype.arcTo=function(da,P,ma,ra,xa,ta,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,da,P,ma,
-ra,xa,ta,Aa);if(null!=Ca)for(var Ba=0;Ba<Ca.length;Ba+=6)this.curveTo(Ca[Ba],Ca[Ba+1],Ca[Ba+2],Ca[Ba+3],Ca[Ba+4],Ca[Ba+5]);this.lastX=ta;this.lastY=Aa}};u.prototype.rect=function(da,P,ma,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(da,P,ma,ra,this.getStyle(!0,!0)))};u.prototype.ellipse=function(da,P,ma,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(da+
-ma/2,P+ra/2,ma,ra,this.getStyle(!0,!0)))};u.prototype.roundrect=function(da,P,ma,ra,xa,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(da+xa,P),this.lineTo(da+ma-xa,P),this.quadTo(da+ma,P,da+ma,P+ta),this.lineTo(da+ma,P+ra-ta),this.quadTo(da+ma,P+ra,da+ma-xa,P+ra),this.lineTo(da+xa,P+ra),this.quadTo(da,P+ra,da,P+ra-ta),this.lineTo(da,P+ta),this.quadTo(da,P,da+xa,P))};u.prototype.drawPath=function(da){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
-da)}catch(ma){}this.passThrough=!1}else if(null!=this.nextShape){for(var P in da)this.nextShape.options[P]=da[P];da.stroke!=mxConstants.NONE&&null!=da.stroke||delete this.nextShape.options.stroke;da.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
+u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(da,R){var ma=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var xa=0;xa<ra.length;xa++)ma=(ma<<5)-ma+ra.charCodeAt(xa)<<0}ma={strokeWidth:this.canvas.state.strokeWidth,seed:ma,preserveVertices:!0};ra=this.rc.getDefaultOptions();ma.stroke=da?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;da=null;(ma.filled=R)?(ma.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,da=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ma.fill="";ma.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);ma.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);ma.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+ra.curveFitting);ma.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);ma.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);ma.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);ma.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);ma.hachureGap="auto"==R?-1:R;ma.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",R);ma.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",R);ma.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);ma.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==R&&(R=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),R=null!=ma.fill&&(null!=da||null!=R&&ma.fill==R)?"solid":ra.fillStyle);
+ma.fillStyle=R;return ma};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var da=2;da<arguments.length;da+=2)this.lastX=arguments[da-1],this.lastY=arguments[da],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+u.prototype.lineTo=function(da,R){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,da,R),this.lastX=da,this.lastY=R)};u.prototype.moveTo=function(da,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,da,R),this.lastX=da,this.lastY=R,this.firstX=da,this.firstY=R)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(da,R,ma,
+ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,da,R,ma,ra),this.lastX=ma,this.lastY=ra)};u.prototype.curveTo=function(da,R,ma,ra,xa,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,da,R,ma,ra,xa,ta),this.lastX=xa,this.lastY=ta)};u.prototype.arcTo=function(da,R,ma,ra,xa,ta,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,da,R,ma,
+ra,xa,ta,Aa);if(null!=Ca)for(var Ba=0;Ba<Ca.length;Ba+=6)this.curveTo(Ca[Ba],Ca[Ba+1],Ca[Ba+2],Ca[Ba+3],Ca[Ba+4],Ca[Ba+5]);this.lastX=ta;this.lastY=Aa}};u.prototype.rect=function(da,R,ma,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(da,R,ma,ra,this.getStyle(!0,!0)))};u.prototype.ellipse=function(da,R,ma,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(da+
+ma/2,R+ra/2,ma,ra,this.getStyle(!0,!0)))};u.prototype.roundrect=function(da,R,ma,ra,xa,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(da+xa,R),this.lineTo(da+ma-xa,R),this.quadTo(da+ma,R,da+ma,R+ta),this.lineTo(da+ma,R+ra-ta),this.quadTo(da+ma,R+ra,da+ma-xa,R+ra),this.lineTo(da+xa,R+ra),this.quadTo(da,R+ra,da,R+ra-ta),this.lineTo(da,R+ta),this.quadTo(da,R,da+xa,R))};u.prototype.drawPath=function(da){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
+da)}catch(ma){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in da)this.nextShape.options[R]=da[R];da.stroke!=mxConstants.NONE&&null!=da.stroke||delete this.nextShape.options.stroke;da.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(da){return new u(da,Editor.createRoughCanvas(da),this)};var H=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(da){return this.outline||
-null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var O=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,P,ma,ra,xa){null!=da.handJiggle&&da.handJiggle.passThrough||O.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(da){var P=da.addTolerance,ma=!0;null!=this.style&&(ma=
+null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var P=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,R,ma,ra,xa){null!=da.handJiggle&&da.handJiggle.passThrough||P.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(da){var R=da.addTolerance,ma=!0;null!=this.style&&(ma=
"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=da.handJiggle&&da.handJiggle.constructor==u&&!this.outline){da.save();var ra=this.fill,xa=this.stroke;this.stroke=this.fill=null;var ta=this.configurePointerEvents,Aa=da.setStrokeColor;da.setStrokeColor=function(){};var Ca=da.setFillColor;da.setFillColor=function(){};ma||null==ra||(this.configurePointerEvents=function(){});da.handJiggle.passThrough=!0;T.apply(this,arguments);da.handJiggle.passThrough=!1;da.setFillColor=
-Ca;da.setStrokeColor=Aa;this.configurePointerEvents=ta;this.stroke=xa;this.fill=ra;da.restore();ma&&null!=ra&&(da.addTolerance=function(){})}T.apply(this,arguments);da.addTolerance=P};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,P,ma,ra,xa,ta){null!=da.handJiggle&&da.handJiggle.constructor==u?(da.handJiggle.passThrough=!0,R.apply(this,arguments),da.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==
-u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,O){if(null!=u&&"undefined"!==typeof pako){var T=u.ownerDocument.getElementsByTagName("div"),R=[];if(null!=T&&0<T.length)for(var da=0;da<T.length;da++)if("mxgraph"==T[da].getAttribute("class")){R.push(T[da]);break}0<R.length&&
-(T=R[0].getAttribute("data-mxgraph"),null!=T?(R=JSON.parse(T),null!=R&&null!=R.xml&&(u=mxUtils.parseXml(R.xml),u=u.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(T=mxUtils.getTextContent(R[0]),T=Graph.decompress(T,null,O),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),
-null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(R=null,"diagram"==u.nodeName?R=u:"mxfile"==u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(R=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=R&&(u=Editor.parseDiagramNode(R,O)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var O=mxUtils.trim(mxUtils.getTextContent(u)),T=null;
-0<O.length?(u=Graph.decompress(O,null,H),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),O=null;0<H.length?O=Graph.decompress(H):null!=u.firstChild&&(O=mxUtils.getXml(u.firstChild));return O};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
-!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var O=u.indexOf("stream",H)+9;if(0<u.substring(H,O).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",O-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(O,H)),{to:"string"})}return null}O=null;H="";for(var T=0,R=0,da=[],P=null;R<u.length;){var ma=u.charCodeAt(R);R+=1;10!=ma&&(H+=String.fromCharCode(ma));ma=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=
-0;if(19==T){var ra=u.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ra>R){O=u.substring(R,ra);break}}10==ma&&("endobj"==H?P=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(P=[],da[H.split(" ")[0]]=P):null!=P&&P.push(H),H="")}null==O&&(O=Editor.extractGraphModelFromXref(da));null!=O&&(O=decodeURIComponent(O.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return O};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,O=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
-null!=H&&0<H.length&&(H=u[H[1]],null!=H&&(H=/.* \/Subject (\d+) (\d+) R/g.exec(H.join("\n")),null!=H&&0<H.length&&(u=u[H[1]],null!=u&&(u=u.join("\n"),O=u.substring(1,u.length-1))))));return O};Editor.extractParserError=function(u,H){var O=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(O=H||mxResources.get("invalidChars"),H=u[0].getElementsByTagName("div"),0<H.length&&(O=mxUtils.getTextContent(H[0])));return null!=O?mxUtils.trim(O):O};Editor.addRetryToError=function(u,
+Ca;da.setStrokeColor=Aa;this.configurePointerEvents=ta;this.stroke=xa;this.fill=ra;da.restore();ma&&null!=ra&&(da.addTolerance=function(){})}T.apply(this,arguments);da.addTolerance=R};var S=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,R,ma,ra,xa,ta){null!=da.handJiggle&&da.handJiggle.constructor==u?(da.handJiggle.passThrough=!0,S.apply(this,arguments),da.handJiggle.passThrough=!1):S.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==
+u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,P){if(null!=u&&"undefined"!==typeof pako){var T=u.ownerDocument.getElementsByTagName("div"),S=[];if(null!=T&&0<T.length)for(var da=0;da<T.length;da++)if("mxgraph"==T[da].getAttribute("class")){S.push(T[da]);break}0<S.length&&
+(T=S[0].getAttribute("data-mxgraph"),null!=T?(S=JSON.parse(T),null!=S&&null!=S.xml&&(u=mxUtils.parseXml(S.xml),u=u.documentElement)):(S=S[0].getElementsByTagName("div"),0<S.length&&(T=mxUtils.getTextContent(S[0]),T=Graph.decompress(T,null,P),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),
+null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(S=null,"diagram"==u.nodeName?S=u:"mxfile"==u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(S=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=S&&(u=Editor.parseDiagramNode(S,P)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var P=mxUtils.trim(mxUtils.getTextContent(u)),T=null;
+0<P.length?(u=Graph.decompress(P,null,H),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),P=null;0<H.length?P=Graph.decompress(H):null!=u.firstChild&&(P=mxUtils.getXml(u.firstChild));return P};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
+!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var P=u.indexOf("stream",H)+9;if(0<u.substring(H,P).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",P-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(P,H)),{to:"string"})}return null}P=null;H="";for(var T=0,S=0,da=[],R=null;S<u.length;){var ma=u.charCodeAt(S);S+=1;10!=ma&&(H+=String.fromCharCode(ma));ma=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=
+0;if(19==T){var ra=u.indexOf("%3C%2Fmxfile%3E)",S)+15;S-=9;if(ra>S){P=u.substring(S,ra);break}}10==ma&&("endobj"==H?R=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(R=[],da[H.split(" ")[0]]=R):null!=R&&R.push(H),H="")}null==P&&(P=Editor.extractGraphModelFromXref(da));null!=P&&(P=decodeURIComponent(P.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return P};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,P=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
+null!=H&&0<H.length&&(H=u[H[1]],null!=H&&(H=/.* \/Subject (\d+) (\d+) R/g.exec(H.join("\n")),null!=H&&0<H.length&&(u=u[H[1]],null!=u&&(u=u.join("\n"),P=u.substring(1,u.length-1))))));return P};Editor.extractParserError=function(u,H){var P=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(P=H||mxResources.get("invalidChars"),H=u[0].getElementsByTagName("div"),0<H.length&&(P=mxUtils.getTextContent(H[0])));return null!=P?mxUtils.trim(P):P};Editor.addRetryToError=function(u,
H){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=H))};Editor.configure=function(u,H){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||DrawioFile.prototype.autosaveDelay;u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=
u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+
-"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var O=document.createElement("style");O.setAttribute("type","text/css");
-O.appendChild(document.createTextNode(u.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(O,T)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var P=document.createElement("style");P.setAttribute("type","text/css");
+P.appendChild(document.createTextNode(u.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(P,T)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
u.defaultCustomLibraries);null!=u.enableCustomLibraries&&(Editor.enableCustomLibraries=u.enableCustomLibraries);null!=u.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=
-u.zoomFactor&&(O=parseFloat(u.zoomFactor),!isNaN(O)&&1<O?Graph.prototype.zoomFactor=O:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(O=parseInt(u.gridSteps),!isNaN(O)&&0<O?mxGraphView.prototype.gridSteps=O:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(O=parseInt(u.pageFormat.width),T=parseInt(u.pageFormat.height),!isNaN(O)&&0<O&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,O,T),
+u.zoomFactor&&(P=parseFloat(u.zoomFactor),!isNaN(P)&&1<P?Graph.prototype.zoomFactor=P:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(P=parseInt(u.gridSteps),!isNaN(P)&&0<P?mxGraphView.prototype.gridSteps=P:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(P=parseInt(u.pageFormat.width),T=parseInt(u.pageFormat.height),!isNaN(P)&&0<P&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,P,T),
mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&
-(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(O=parseInt(u.sidebarTitleSize),!isNaN(O)&&0<O?Sidebar.prototype.sidebarTitleSize=O:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(O=parseInt(u.autosaveDelay),!isNaN(O)&&0<O?DrawioFile.prototype.autosaveDelay=O:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
+(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(P=parseInt(u.sidebarTitleSize),!isNaN(P)&&0<P?Sidebar.prototype.sidebarTitleSize=P:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(P=parseInt(u.autosaveDelay),!isNaN(P)&&0<P?DrawioFile.prototype.autosaveDelay=P:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
if(null!=u.plugins&&!H)for(App.initPluginCallback(),H=0;H<u.plugins.length;H++)mxscript(u.plugins[H]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;
-var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var O=document.createElement("style");O.setAttribute("type","text/css");O.appendChild(document.createTextNode(u));H.parentNode.insertBefore(O,H);u=u.split("url(");for(O=1;O<u.length;O++){var T=u[O].indexOf(")");T=Editor.trimCssUrl(u[O].substring(0,T));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",T);R.setAttribute("as","font");R.setAttribute("crossorigin","");H.parentNode.insertBefore(R,
-H)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var H=[],O=0;O<u;O++)H.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return H.join("")};Editor.prototype.timeout=
+var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var P=document.createElement("style");P.setAttribute("type","text/css");P.appendChild(document.createTextNode(u));H.parentNode.insertBefore(P,H);u=u.split("url(");for(P=1;P<u.length;P++){var T=u[P].indexOf(")");T=Editor.trimCssUrl(u[P].substring(0,T));var S=document.createElement("link");S.setAttribute("rel","preload");S.setAttribute("href",T);S.setAttribute("as","font");S.setAttribute("crossorigin","");H.parentNode.insertBefore(S,
+H)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var H=[],P=0;P<u;P++)H.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return H.join("")};Editor.prototype.timeout=
25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var H=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(H)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[H]),Error(mxResources.get("notADiagramFile")+
-" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(O=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=O&&(T=new mxCodec(O.ownerDocument),T.decode(O,this.graph.getStylesheet())));else{var O=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=O){var T=new mxCodec(O.ownerDocument);
-T.decode(O,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
-H.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),O=0;O<H.length;O++)this.graph.addExtFont(H[O].name,H[O].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,H){u=null!=
-u?u:!0;var O=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&O.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=T&&O.setAttribute("backgroundImage",JSON.stringify(T));O.setAttribute("math",this.graph.mathEnabled?"1":"0");O.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(R){return R.name+
-"^"+R.url}),O.setAttribute("extFonts",T.join("|")));return O};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var O=mxUtils.parseXml(H).documentElement;return"mxfile"==O.nodeName||"mxGraphModel"==O.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=
-function(u,H,O){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,
-arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R])}catch(da){MathJax.typesetClear([R]),null!=da.retry?da.retry.then(function(){MathJax.typeset([R])}):null!=window.console&&console.log("Error in MathJax: "+
-da.toString())}};window.MathJax=null!=H?H:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var O=Editor.prototype.init;
-Editor.prototype.init=function(){O.apply(this,arguments);var R=mxUtils.bind(this,function(da,P){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",u);H[0].parentNode.appendChild(T)}}};
-Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(O,T,R,da){void 0!==T?H.push(T.replace(/\\'/g,"'")):void 0!==R?H.push(R.replace(/\\"/g,
-'"')):void 0!==da&&H.push(da);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===
-u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,O=this;u.convert=function(T){if(null!=T){var R="http://"==T.substring(0,7)||"https://"==T.substring(0,8);R&&!navigator.onLine?T=Editor.svgBrokenImage.src:!R||T.substring(0,u.baseUrl.length)==u.baseUrl||O.crossOriginImages&&O.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=H.apply(this,
-arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var O=!0,T=window.setTimeout(mxUtils.bind(this,function(){O=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(da){window.clearTimeout(T);O&&H(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(T);
-O&&H(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(T);if(O)try{var da=document.createElement("canvas"),P=da.getContext("2d");da.height=R.height;da.width=R.width;P.drawImage(R,0,0);H(da.toDataURL())}catch(ma){H(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(T);O&&H(Editor.svgBrokenImage.src)};R.src=u}}catch(da){H(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,
-H,O,T){null==T&&(T=this.createImageUrlConverter());var R=0,da=O||{};O=mxUtils.bind(this,function(P,ma){P=u.getElementsByTagName(P);for(var ra=0;ra<P.length;ra++)mxUtils.bind(this,function(xa){try{if(null!=xa){var ta=T.convert(xa.getAttribute(ma));if(null!=ta&&"data:"!=ta.substring(0,5)){var Aa=da[ta];null==Aa?(R++,this.convertImageToDataUri(ta,function(Ca){null!=Ca&&(da[ta]=Ca,xa.setAttribute(ma,Ca));R--;0==R&&H(u)})):xa.setAttribute(ma,Aa)}else null!=ta&&xa.setAttribute(ma,ta)}}catch(Ca){}})(P[ra])});
-O("image","xlink:href");O("img","src");0==R&&H(u)};Editor.base64Encode=function(u){for(var H="",O=0,T=u.length,R,da,P;O<T;){R=u.charCodeAt(O++)&255;if(O==T){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);H+="==";break}da=u.charCodeAt(O++);if(O==T){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
-3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);H+="=";break}P=u.charCodeAt(O++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(P&192)>>6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P&
-63)}return H};Editor.prototype.loadUrl=function(u,H,O,T,R,da,P,ma){try{var ra=!P&&(T||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));R=null!=R?R:!0;var xa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ta){if(200<=ta.getStatus()&&299>=ta.getStatus()){if(null!=H){var Aa=ta.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ta=mxUtilsBinaryToArray(ta.request.responseBody).toArray();
-Aa=Array(ta.length);for(var Ca=0;Ca<ta.length;Ca++)Aa[Ca]=String.fromCharCode(ta[Ca]);Aa=Aa.join("")}da=null!=da?da:"data:image/png;base64,";Aa=da+Editor.base64Encode(Aa)}H(Aa)}}else null!=O&&(0==ta.getStatus()?O({message:mxResources.get("accessDenied")},ta):O({message:mxResources.get("error")+" "+ta.getStatus()},ta))}),function(ta){null!=O&&O({message:mxResources.get("error")+" "+ta.getStatus()})},ra,this.timeout,function(){R&&null!=O&&O({code:App.ERROR_TIMEOUT,retry:xa})},ma)});xa()}catch(ta){null!=
-O&&O(ta)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var O=u.split("url(");if(0<O.length){H=[O[0]];u=window.location.pathname;var T=null!=u?u.lastIndexOf("/"):-1;0<=T&&(u=u.substring(0,T+1));T=document.getElementsByTagName("base");var R=null;null!=T&&0<T.length&&(R=T[0].getAttribute("href"));for(var da=1;da<O.length;da++)if(T=O[da].indexOf(")"),0<T){var P=Editor.trimCssUrl(O[da].substring(0,T));this.graph.isRelativeUrl(P)&&(P=null!=R?R+P:window.location.protocol+"//"+window.location.hostname+
-("/"==P.charAt(0)?"":u)+P);H.push('url("'+P+'"'+O[da].substring(T))}else H.push(O[da])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,O){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));O(u,H)};Editor.prototype.embedCssFonts=function(u,H){var O=u.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==T){for(var ra=[O[0]],xa=1;xa<O.length;xa++){var ta=O[xa].indexOf(")");
-ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(O[xa].substring(0,ta))]);ra.push('"'+O[xa].substring(ta))}H(ra.join(""))}});if(0<O.length){for(u=1;u<O.length;u++){var da=O[u].indexOf(")"),P=null,ma=O[u].indexOf("format(",da);0<ma&&(P=Editor.trimCssUrl(O[u].substring(ma+7,O[u].indexOf(")",ma))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=ra;T++;var xa="application/x-font-ttf";if("svg"==P||/(\.svg)($|\?)/i.test(ra))xa="image/svg+xml";else if("otf"==
-P||"embedded-opentype"==P||/(\.otf)($|\?)/i.test(ra))xa="application/x-font-opentype";else if("woff"==P||/(\.woff)($|\?)/i.test(ra))xa="application/font-woff";else if("woff2"==P||/(\.woff2)($|\?)/i.test(ra))xa="application/font-woff2";else if("eot"==P||/(\.eot)($|\?)/i.test(ra))xa="application/vnd.ms-fontobject";else if("sfnt"==P||/(\.sfnt)($|\?)/i.test(ra))xa="application/font-sfnt";this.mapFontUrl(xa,ra,mxUtils.bind(this,function(ta,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(Ca){this.cachedFonts[ra]=
-Ca;T--;R()}),mxUtils.bind(this,function(Ca){T--;R()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(O[u].substring(0,da)),P)}R()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);
-return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var O=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(O.join(""),u)}),da=0;da<H.length;da++)mxUtils.bind(this,function(P,ma){Graph.isCssFontUrl(ma)?null==this.cachedGoogleFonts[ma]?(T++,this.loadUrl(ma,mxUtils.bind(this,function(ra){this.cachedGoogleFonts[ma]=ra;O.push(ra+"\n");T--;R()}),mxUtils.bind(this,
-function(ra){T--;O.push("@import url("+ma+");\n");R()}))):O.push(this.cachedGoogleFonts[ma]+"\n"):O.push('@font-face {font-family: "'+P+'";src: url("'+ma+'")}\n')})(H[da].name,H[da].url);R()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),O=0;O<H.length;O++){var T=mxUtils.getTextContent(H[O]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(H[O].cloneNode(!0))}};Editor.prototype.addFontCss=
-function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var O=u.getElementsByTagName("defs"),T=u.ownerDocument;0==O.length?(O=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(O,u.firstChild):u.appendChild(O)):O=O[0];u=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);O.appendChild(u)}};Editor.prototype.isExportToCanvas=
-function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,O){var T=mxClient.IS_FF?8192:16384;return Math.min(O,Math.min(T/u,T/H))};Editor.prototype.exportToCanvas=function(u,H,O,T,R,da,P,ma,ra,xa,ta,Aa,Ca,Ba,sa,Oa,Ta,Sa){try{da=null!=da?da:!0;P=null!=P?P:!0;Aa=null!=Aa?Aa:this.graph;Ca=null!=Ca?Ca:0;var $a=ra?null:Aa.background;$a==mxConstants.NONE&&($a=null);null==$a&&($a=T);null==$a&&0==ra&&($a=Oa?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(Aa.getSvg(null,null,Ca,Ba,null,P,null,null,null,xa,null,Oa,Ta,Sa),mxUtils.bind(this,function(Ga){try{var eb=new Image;eb.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){X.drawImage(eb,0,0);u(L,Ga)},0):(X.drawImage(eb,0,0),u(L,Ga))},L=document.createElement("canvas"),M=parseInt(Ga.getAttribute("width")),U=parseInt(Ga.getAttribute("height"));ma=null!=ma?ma:1;null!=H&&(ma=da?Math.min(1,Math.min(3*H/(4*U),H/M)):H/M);ma=this.getMaxCanvasScale(M,
-U,ma);M=Math.ceil(ma*M);U=Math.ceil(ma*U);L.setAttribute("width",M);L.setAttribute("height",U);var X=L.getContext("2d");null!=$a&&(X.beginPath(),X.rect(0,0,M,U),X.fillStyle=$a,X.fill());1!=ma&&X.scale(ma,ma);if(sa){var fa=Aa.view,na=fa.scale;fa.scale=1;var ua=btoa(unescape(encodeURIComponent(fa.createSvgGrid(fa.gridColor))));fa.scale=na;ua="data:image/svg+xml;base64,"+ua;var pa=Aa.gridSize*fa.gridSteps*ma,za=Aa.getGraphBounds(),Da=fa.translate.x*na,Ma=fa.translate.y*na,La=Da+(za.x-Da)/na-Ca,Ua=Ma+
-(za.y-Ma)/na-Ca,Ra=new Image;Ra.onload=function(){try{for(var Fa=-Math.round(pa-mxUtils.mod((Da-La)*ma,pa)),va=-Math.round(pa-mxUtils.mod((Ma-Ua)*ma,pa));Fa<M;Fa+=pa)for(var ya=va;ya<U;ya+=pa)X.drawImage(Ra,Fa/ma,ya/ma);z()}catch(Na){null!=R&&R(Na)}};Ra.onerror=function(Fa){null!=R&&R(Fa)};Ra.src=ua}else z()}catch(Fa){null!=R&&R(Fa)}});eb.onerror=function(z){null!=R&&R(z)};xa&&this.graph.addSvgShadow(Ga);this.graph.mathEnabled&&this.addMathCss(Ga);var bb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
-this.addFontCss(Ga,this.resolvedFontCss),eb.src=Editor.createSvgDataUri(mxUtils.getXml(Ga))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ga,z),this.loadFonts(bb)}catch(L){null!=R&&R(L)}}))}catch(z){null!=R&&R(z)}}),O,ta)}catch(Ga){null!=R&&R(Ga)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,O,T){for(var R=0;R<T;R++)u=Editor.crcTable[(u^
-H.charCodeAt(O+R))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,O=0;O<u.length;O++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(O))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,O,T,R){function da(ta,Aa){var Ca=ra;ra+=Aa;return ta.substring(Ca,ra)}function P(ta){ta=da(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<16)+(ta.charCodeAt(0)<<24)}function ma(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}u=u.substring(u.indexOf(",")+
-1);u=window.atob?atob(u):Base64.decode(u,!0);var ra=0;if(da(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(da(u,4),"IHDR"!=da(u,4))null!=R&&R();else{da(u,17);R=u.substring(0,ra);do{var xa=P(u);if("IDAT"==da(u,4)){R=u.substring(0,ra-8);"pHYs"==H&&"dpi"==O?(O=Math.round(T/.0254),O=ma(O)+ma(O)+String.fromCharCode(1)):O=O+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,H,0,4);T=Editor.updateCRC(T,O,0,O.length);
-R+=ma(O.length)+H+O+ma(T^4294967295);R+=u.substring(ra-8,u.length);break}R+=u.substring(ra-8,ra-4+xa);da(u,xa);da(u,4)}while(xa);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,H){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;
-ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,H){var O=null;null!=u.editor.graph.getModel().getParent(H)?O=H.getId():null!=u.currentPage&&(O=u.currentPage.getId());return O});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 m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
-function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,O=H.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return O.shadowVisible},function(R){var da=new ChangePageSetup(H);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=R;O.model.execute(da)},{install:function(R){this.listener=function(){R(O.shadowVisible)};H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});
-Editor.enableShadowOption||(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));u.appendChild(T)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,arguments);var H=this.editorUi,O=H.editor.graph;if(O.isEnabled()){var T=H.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(P){H.editor.setAutosave(P);
-H.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(P){this.listener=function(){P(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(R)}}if(this.isMathOptionVisible()&&O.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return O.mathEnabled},function(P){H.actions.get("mathematicalTypesetting").funct()},{install:function(P){this.listener=
-function(){P(O.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});R.style.paddingTop="5px";u.appendChild(R);var da=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position="relative";da.style.marginLeft="6px";da.style.top="2px";R.appendChild(da)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
-[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
-type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",
-type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},
-{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",
-type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
-type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
-dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
-mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(P=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=P&&(T=new mxCodec(P.ownerDocument),T.decode(P,this.graph.getStylesheet())));else{var P=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=P){var T=new mxCodec(P.ownerDocument);
+T.decode(P,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
+H.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}}),P=0;P<H.length;P++)this.graph.addExtFont(H[P].name,H[P].url)}catch(S){console.log("ExtFonts format error: "+S.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,H){u=null!=
+u?u:!0;var P=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&P.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=T&&P.setAttribute("backgroundImage",JSON.stringify(T));P.setAttribute("math",this.graph.mathEnabled?"1":"0");P.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(S){return S.name+
+"^"+S.url}),P.setAttribute("extFonts",T.join("|")));return P};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var P=mxUtils.parseXml(H).documentElement;return"mxfile"==P.nodeName||"mxGraphModel"==P.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=
+function(u,H,P){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,
+arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(S){try{MathJax.typesetClear([S]),MathJax.typeset([S]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([S]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([S]).then(Editor.onMathJaxDone)}):
+null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=H?H:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.MathJaxClear=
+function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var S=mxUtils.bind(this,function(da,R){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var T=document.createElement("script");
+T.setAttribute("type","text/javascript");T.setAttribute("src",u);H[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(P,T,S,da){void 0!==T?H.push(T.replace(/\\'/g,"'")):void 0!==S?H.push(S.replace(/\\"/g,'"')):void 0!==da&&H.push(da);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||
+"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,P=this;u.convert=function(T){if(null!=T){var S="http://"==T.substring(0,7)||"https://"==T.substring(0,8);S&&!navigator.onLine?T=Editor.svgBrokenImage.src:!S||T.substring(0,u.baseUrl.length)==u.baseUrl||P.crossOriginImages&&P.isCorsEnabledForUrl(T)?
+"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=H.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var P=!0,T=window.setTimeout(mxUtils.bind(this,function(){P=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(da){window.clearTimeout(T);
+P&&H(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(T);P&&H(Editor.svgBrokenImage.src)});else{var S=new Image;this.crossOriginImages&&(S.crossOrigin="anonymous");S.onload=function(){window.clearTimeout(T);if(P)try{var da=document.createElement("canvas"),R=da.getContext("2d");da.height=S.height;da.width=S.width;R.drawImage(S,0,0);H(da.toDataURL())}catch(ma){H(Editor.svgBrokenImage.src)}};S.onerror=function(){window.clearTimeout(T);P&&H(Editor.svgBrokenImage.src)};S.src=u}}catch(da){H(Editor.svgBrokenImage.src)}};
+Editor.prototype.convertImages=function(u,H,P,T){null==T&&(T=this.createImageUrlConverter());var S=0,da=P||{};P=mxUtils.bind(this,function(R,ma){R=u.getElementsByTagName(R);for(var ra=0;ra<R.length;ra++)mxUtils.bind(this,function(xa){try{if(null!=xa){var ta=T.convert(xa.getAttribute(ma));if(null!=ta&&"data:"!=ta.substring(0,5)){var Aa=da[ta];null==Aa?(S++,this.convertImageToDataUri(ta,function(Ca){null!=Ca&&(da[ta]=Ca,xa.setAttribute(ma,Ca));S--;0==S&&H(u)})):xa.setAttribute(ma,Aa)}else null!=ta&&
+xa.setAttribute(ma,ta)}}catch(Ca){}})(R[ra])});P("image","xlink:href");P("img","src");0==S&&H(u)};Editor.base64Encode=function(u){for(var H="",P=0,T=u.length,S,da,R;P<T;){S=u.charCodeAt(P++)&255;if(P==T){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&3)<<4);H+="==";break}da=u.charCodeAt(P++);if(P==T){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);
+H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);H+="=";break}R=u.charCodeAt(P++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(R&192)>>6);
+H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return H};Editor.prototype.loadUrl=function(u,H,P,T,S,da,R,ma){try{var ra=!R&&(T||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));S=null!=S?S:!0;var xa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ta){if(200<=ta.getStatus()&&299>=ta.getStatus()){if(null!=H){var Aa=ta.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){ta=mxUtilsBinaryToArray(ta.request.responseBody).toArray();Aa=Array(ta.length);for(var Ca=0;Ca<ta.length;Ca++)Aa[Ca]=String.fromCharCode(ta[Ca]);Aa=Aa.join("")}da=null!=da?da:"data:image/png;base64,";Aa=da+Editor.base64Encode(Aa)}H(Aa)}}else null!=P&&(0==ta.getStatus()?P({message:mxResources.get("accessDenied")},ta):P({message:mxResources.get("error")+" "+ta.getStatus()},ta))}),function(ta){null!=P&&P({message:mxResources.get("error")+" "+ta.getStatus()})},
+ra,this.timeout,function(){S&&null!=P&&P({code:App.ERROR_TIMEOUT,retry:xa})},ma)});xa()}catch(ta){null!=P&&P(ta)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var P=u.split("url(");if(0<P.length){H=[P[0]];u=window.location.pathname;var T=null!=u?u.lastIndexOf("/"):-1;0<=T&&(u=u.substring(0,T+1));T=document.getElementsByTagName("base");var S=null;null!=T&&0<T.length&&(S=T[0].getAttribute("href"));for(var da=1;da<P.length;da++)if(T=P[da].indexOf(")"),0<T){var R=Editor.trimCssUrl(P[da].substring(0,
+T));this.graph.isRelativeUrl(R)&&(R=null!=S?S+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":u)+R);H.push('url("'+R+'"'+P[da].substring(T))}else H.push(P[da])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,P){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));P(u,H)};Editor.prototype.embedCssFonts=function(u,H){var P=u.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var S=
+mxUtils.bind(this,function(){if(0==T){for(var ra=[P[0]],xa=1;xa<P.length;xa++){var ta=P[xa].indexOf(")");ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(P[xa].substring(0,ta))]);ra.push('"'+P[xa].substring(ta))}H(ra.join(""))}});if(0<P.length){for(u=1;u<P.length;u++){var da=P[u].indexOf(")"),R=null,ma=P[u].indexOf("format(",da);0<ma&&(R=Editor.trimCssUrl(P[u].substring(ma+7,P[u].indexOf(")",ma))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=ra;T++;
+var xa="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(ra))xa="image/svg+xml";else if("otf"==R||"embedded-opentype"==R||/(\.otf)($|\?)/i.test(ra))xa="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(ra))xa="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(ra))xa="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(ra))xa="application/vnd.ms-fontobject";else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(ra))xa="application/font-sfnt";this.mapFontUrl(xa,
+ra,mxUtils.bind(this,function(ta,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(Ca){this.cachedFonts[ra]=Ca;T--;S()}),mxUtils.bind(this,function(Ca){T--;S()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(P[u].substring(0,da)),R)}S()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=
+function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var P=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var S=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(P.join(""),u)}),da=0;da<H.length;da++)mxUtils.bind(this,function(R,ma){Graph.isCssFontUrl(ma)?null==this.cachedGoogleFonts[ma]?(T++,this.loadUrl(ma,
+mxUtils.bind(this,function(ra){this.cachedGoogleFonts[ma]=ra;P.push(ra+"\n");T--;S()}),mxUtils.bind(this,function(ra){T--;P.push("@import url("+ma+");\n");S()}))):P.push(this.cachedGoogleFonts[ma]+"\n"):P.push('@font-face {font-family: "'+R+'";src: url("'+ma+'")}\n')})(H[da].name,H[da].url);S()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),P=0;P<H.length;P++){var T=mxUtils.getTextContent(H[P]);
+0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(H[P].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var P=u.getElementsByTagName("defs"),T=u.ownerDocument;0==P.length?(P=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(P,u.firstChild):u.appendChild(P)):P=P[0];u=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):
+T.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);P.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,P){var T=mxClient.IS_FF?8192:16384;return Math.min(P,Math.min(T/u,T/H))};Editor.prototype.exportToCanvas=function(u,H,P,T,S,da,R,ma,ra,xa,ta,Aa,Ca,Ba,sa,Pa,Ta,Oa){try{da=null!=da?da:!0;R=null!=R?R:!0;Aa=null!=Aa?Aa:this.graph;Ca=null!=Ca?Ca:0;var Xa=
+ra?null:Aa.background;Xa==mxConstants.NONE&&(Xa=null);null==Xa&&(Xa=T);null==Xa&&0==ra&&(Xa=Pa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Aa.getSvg(null,null,Ca,Ba,null,R,null,null,null,xa,null,Pa,Ta,Oa),mxUtils.bind(this,function(Ga){try{var eb=new Image;eb.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(eb,0,0);u(K,Ga)},0):(W.drawImage(eb,0,0),u(K,Ga))},K=document.createElement("canvas"),M=parseInt(Ga.getAttribute("width")),
+U=parseInt(Ga.getAttribute("height"));ma=null!=ma?ma:1;null!=H&&(ma=da?Math.min(1,Math.min(3*H/(4*U),H/M)):H/M);ma=this.getMaxCanvasScale(M,U,ma);M=Math.ceil(ma*M);U=Math.ceil(ma*U);K.setAttribute("width",M);K.setAttribute("height",U);var W=K.getContext("2d");null!=Xa&&(W.beginPath(),W.rect(0,0,M,U),W.fillStyle=Xa,W.fill());1!=ma&&W.scale(ma,ma);if(sa){var ha=Aa.view,na=ha.scale;ha.scale=1;var ua=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));ha.scale=na;ua="data:image/svg+xml;base64,"+
+ua;var pa=Aa.gridSize*ha.gridSteps*ma,za=Aa.getGraphBounds(),Da=ha.translate.x*na,Ma=ha.translate.y*na,La=Da+(za.x-Da)/na-Ca,Ua=Ma+(za.y-Ma)/na-Ca,Sa=new Image;Sa.onload=function(){try{for(var Fa=-Math.round(pa-mxUtils.mod((Da-La)*ma,pa)),va=-Math.round(pa-mxUtils.mod((Ma-Ua)*ma,pa));Fa<M;Fa+=pa)for(var ya=va;ya<U;ya+=pa)W.drawImage(Sa,Fa/ma,ya/ma);z()}catch(Na){null!=S&&S(Na)}};Sa.onerror=function(Fa){null!=S&&S(Fa)};Sa.src=ua}else z()}catch(Fa){null!=S&&S(Fa)}});eb.onerror=function(z){null!=S&&
+S(z)};xa&&this.graph.addSvgShadow(Ga);this.graph.mathEnabled&&this.addMathCss(Ga);var bb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ga,this.resolvedFontCss),eb.src=Editor.createSvgDataUri(mxUtils.getXml(Ga))}catch(z){null!=S&&S(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ga,z),this.loadFonts(bb)}catch(K){null!=S&&S(K)}}))}catch(z){null!=S&&S(z)}}),P,ta)}catch(Ga){null!=S&&S(Ga)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=
+D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,P,T){for(var S=0;S<T;S++)u=Editor.crcTable[(u^H.charCodeAt(P+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,P=0;P<u.length;P++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(P))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,P,T,S){function da(ta,Aa){var Ca=ra;ra+=Aa;return ta.substring(Ca,ra)}function R(ta){ta=da(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<
+16)+(ta.charCodeAt(0)<<24)}function ma(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var ra=0;if(da(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(da(u,4),"IHDR"!=da(u,4))null!=S&&S();else{da(u,17);S=u.substring(0,ra);do{var xa=R(u);if("IDAT"==da(u,4)){S=u.substring(0,ra-8);"pHYs"==H&&"dpi"==P?(P=Math.round(T/.0254),P=ma(P)+ma(P)+String.fromCharCode(1)):P=
+P+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,H,0,4);T=Editor.updateCRC(T,P,0,P.length);S+=ma(P.length)+H+P+ma(T^4294967295);S+=u.substring(ra-8,u.length);break}S+=u.substring(ra-8,ra-4+xa);da(u,xa);da(u,4)}while(xa);return"data:image/png;base64,"+(window.btoa?btoa(S):Base64.encode(S,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
+function(u,H){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,H){var P=null;null!=u.editor.graph.getModel().getParent(H)?P=H.getId():null!=u.currentPage&&(P=u.currentPage.getId());return P});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 m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,P=H.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return P.shadowVisible},function(S){var da=new ChangePageSetup(H);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=S;P.model.execute(da)},{install:function(S){this.listener=function(){S(P.shadowVisible)};
+H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));u.appendChild(T)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,arguments);var H=this.editorUi,P=H.editor.graph;if(P.isEnabled()){var T=H.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var S=
+this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(R){H.editor.setAutosave(R);H.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(S)}}if(this.isMathOptionVisible()&&P.isEnabled()&&"undefined"!==typeof MathJax){S=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return P.mathEnabled},function(R){H.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=function(){R(P.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});S.style.paddingTop="5px";u.appendChild(S);var da=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position="relative";da.style.marginLeft="6px";da.style.top="2px";S.appendChild(da)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
+dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
+type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
+[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
+type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
+type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
@@ -3230,93 +3231,93 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(u,H,O){if(null!=H){var T=function(da){if(null!=da)if(O)for(var P=0;P<da.length;P++)H[da[P].name]=da[P];else for(var ma in H){var ra=!1;for(P=0;P<da.length;P++)if(da[P].name==ma&&da[P].type==H[ma].type){ra=!0;break}ra||delete H[ma]}},R=this.editorUi.editor.graph.view.getState(u);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),T(R.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{T(JSON.parse(u))}catch(da){}}};var F=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H=
-{},O=u.vertices,T=u.edges,R=0;R<O.length;R++)this.findCommonProperties(O[R],H,0==R);for(R=0;R<T.length;R++)this.findCommonProperties(T[R],H,0==O.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(u,H,O){function T(X,fa,na,ua){Aa.getModel().beginUpdate();try{var pa=[],za=[];if(null!=na.index){for(var Da=[],Ma=na.parentRow.nextSibling;Ma&&Ma.getAttribute("data-pName")==X;)Da.push(Ma.getAttribute("data-pValue")),Ma=Ma.nextSibling;na.index<Da.length?null!=ua?Da.splice(ua,1):Da[na.index]=fa:Da.push(fa);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));fa=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,
-Aa.getSelectionCells()),pa.push(na.countProperty),za.push(Da.length))}Aa.setCellStyles(X,fa,Aa.getSelectionCells());pa.push(X);za.push(fa);if(null!=na.dependentProps)for(X=0;X<na.dependentProps.length;X++){var La=na.dependentPropsDefVal[X],Ua=na.dependentPropsVals[X];if(Ua.length>fa)Ua=Ua.slice(0,fa);else for(var Ra=Ua.length;Ra<fa;Ra++)Ua.push(La);Ua=Ua.join(",");Aa.setCellStyles(na.dependentProps[X],Ua,Aa.getSelectionCells());pa.push(na.dependentProps[X]);za.push(Ua)}if("function"==typeof na.onChange)na.onChange(Aa,
-fa);ta.editorUi.fireEvent(new mxEventObject("styleChanged","keys",pa,"values",za,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function R(X,fa,na){var ua=mxUtils.getOffset(u,!0),pa=mxUtils.getOffset(X,!0);fa.style.position="absolute";fa.style.left=pa.x-ua.x+"px";fa.style.top=pa.y-ua.y+"px";fa.style.width=X.offsetWidth+"px";fa.style.height=X.offsetHeight-(na?4:0)+"px";fa.style.zIndex=5}function da(X,fa,na){var ua=document.createElement("div");ua.style.width="32px";ua.style.height=
-"4px";ua.style.margin="2px";ua.style.border="1px solid black";ua.style.background=fa&&"none"!=fa?fa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ta,function(pa){this.editorUi.pickColor(fa,function(za){ua.style.background="none"==za?"url('"+Dialog.prototype.noColorImage+"')":za;T(X,za,na)});mxEvent.consume(pa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ua);return btn}function P(X,fa,na,ua,pa,za,Da){null!=fa&&(fa=fa.split(","),
-Ca.push({name:X,values:fa,type:na,defVal:ua,countProperty:pa,parentRow:za,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(ta,function(Ma){for(var La=za,Ua=0;null!=La.nextSibling;)if(La.nextSibling.getAttribute("data-pName")==X)La=La.nextSibling,Ua++;else break;var Ra={type:na,parentRow:za,index:Ua,isDeletable:!0,defVal:ua,countProperty:pa};Ua=xa(X,"",Ra,0==Ua%2,Da);T(X,ua,Ra);La.parentNode.insertBefore(Ua,La.nextSibling);mxEvent.consume(Ma)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function ma(X,fa,na,ua,pa,za,Da){if(0<pa){var Ma=Array(pa);fa=null!=fa?fa.split(","):[];for(var La=0;La<pa;La++)Ma[La]=null!=fa[La]?fa[La]:null!=ua?ua:"";Ca.push({name:X,values:Ma,type:na,defVal:ua,parentRow:za,flipBkg:Da,size:pa})}return document.createElement("div")}function ra(X,fa,na){var ua=document.createElement("input");ua.type="checkbox";ua.checked="1"==fa;mxEvent.addListener(ua,"change",function(){T(X,ua.checked?"1":"0",na)});return ua}function xa(X,
-fa,na,ua,pa){var za=na.dispName,Da=na.type,Ma=document.createElement("tr");Ma.className="gePropRow"+(pa?"Dark":"")+(ua?"Alt":"")+" gePropNonHeaderRow";Ma.setAttribute("data-pName",X);Ma.setAttribute("data-pValue",fa);ua=!1;null!=na.index&&(Ma.setAttribute("data-index",na.index),za=(null!=za?za:"")+"["+na.index+"]",ua=!0);var La=document.createElement("td");La.className="gePropRowCell";za=mxResources.get(za,null,za);mxUtils.write(La,za);La.setAttribute("title",za);ua&&(La.style.textAlign="right");
-Ma.appendChild(La);La=document.createElement("td");La.className="gePropRowCell";if("color"==Da)La.appendChild(da(X,fa,na));else if("bool"==Da||"boolean"==Da)La.appendChild(ra(X,fa,na));else if("enum"==Da){var Ua=na.enumList;for(pa=0;pa<Ua.length;pa++)if(za=Ua[pa],za.val==fa){mxUtils.write(La,mxResources.get(za.dispName,null,za.dispName));break}mxEvent.addListener(La,"click",mxUtils.bind(ta,function(){var Ra=document.createElement("select");R(La,Ra);for(var Fa=0;Fa<Ua.length;Fa++){var va=Ua[Fa],ya=
-document.createElement("option");ya.value=mxUtils.htmlEntities(va.val);mxUtils.write(ya,mxResources.get(va.dispName,null,va.dispName));Ra.appendChild(ya)}Ra.value=fa;u.appendChild(Ra);mxEvent.addListener(Ra,"change",function(){var Na=mxUtils.htmlEntities(Ra.value);T(X,Na,na)});Ra.focus();mxEvent.addListener(Ra,"blur",function(){u.removeChild(Ra)})}))}else"dynamicArr"==Da?La.appendChild(P(X,fa,na.subType,na.subDefVal,na.countProperty,Ma,pa)):"staticArr"==Da?La.appendChild(ma(X,fa,na.subType,na.subDefVal,
-na.size,Ma,pa)):"readOnly"==Da?(pa=document.createElement("input"),pa.setAttribute("readonly",""),pa.value=fa,pa.style.width="96px",pa.style.borderWidth="0px",La.appendChild(pa)):(La.innerHTML=mxUtils.htmlEntities(decodeURIComponent(fa)),mxEvent.addListener(La,"click",mxUtils.bind(ta,function(){function Ra(){var va=Fa.value;va=0==va.length&&"string"!=Da?0:va;na.allowAuto&&(null!=va.trim&&"auto"==va.trim().toLowerCase()?(va="auto",Da="string"):(va=parseFloat(va),va=isNaN(va)?0:va));null!=na.min&&va<
-na.min?va=na.min:null!=na.max&&va>na.max&&(va=na.max);va=encodeURIComponent(("int"==Da?parseInt(va):va)+"");T(X,va,na)}var Fa=document.createElement("input");R(La,Fa,!0);Fa.value=decodeURIComponent(fa);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(va){13==va.keyCode&&Ra()});Fa.focus();mxEvent.addListener(Fa,
-"blur",function(){Ra()})})));na.isDeletable&&(pa=mxUtils.button("-",mxUtils.bind(ta,function(Ra){T(X,"",na,na.index);mxEvent.consume(Ra)})),pa.style.height="16px",pa.style.width="25px",pa.style.float="right",pa.className="geColorBtn",La.appendChild(pa));Ma.appendChild(La);return Ma}var ta=this,Aa=this.editorUi.editor.graph,Ca=[];u.style.position="relative";u.style.padding="0";var Ba=document.createElement("table");Ba.className="geProperties";Ba.style.whiteSpace="nowrap";Ba.style.width="100%";var sa=
-document.createElement("tr");sa.className="gePropHeader";var Oa=document.createElement("th");Oa.className="gePropHeaderCell";var Ta=document.createElement("img");Ta.src=Sidebar.prototype.expandedImage;Ta.style.verticalAlign="middle";Oa.appendChild(Ta);mxUtils.write(Oa,mxResources.get("property"));sa.style.cursor="pointer";var Sa=function(){var X=Ba.querySelectorAll(".gePropNonHeaderRow");if(ta.editorUi.propertiesCollapsed){Ta.src=Sidebar.prototype.collapsedImage;var fa="none";for(var na=u.childNodes.length-
-1;0<=na;na--)try{var ua=u.childNodes[na],pa=ua.nodeName.toUpperCase();"INPUT"!=pa&&"SELECT"!=pa||u.removeChild(ua)}catch(za){}}else Ta.src=Sidebar.prototype.expandedImage,fa="";for(na=0;na<X.length;na++)X[na].style.display=fa};mxEvent.addListener(sa,"click",function(){ta.editorUi.propertiesCollapsed=!ta.editorUi.propertiesCollapsed;Sa()});sa.appendChild(Oa);Oa=document.createElement("th");Oa.className="gePropHeaderCell";Oa.innerHTML=mxResources.get("value");sa.appendChild(Oa);Ba.appendChild(sa);var $a=
-!1,Ga=!1;sa=null;1==O.vertices.length&&0==O.edges.length?sa=O.vertices[0].id:0==O.vertices.length&&1==O.edges.length&&(sa=O.edges[0].id);null!=sa&&Ba.appendChild(xa("id",mxUtils.htmlEntities(sa),{dispName:"ID",type:"readOnly"},!0,!1));for(var eb in H)if(sa=H[eb],"function"!=typeof sa.isVisible||sa.isVisible(O,this)){var bb=null!=O.style[eb]?mxUtils.htmlEntities(O.style[eb]+""):null!=sa.getDefaultValue?sa.getDefaultValue(O,this):sa.defVal;if("separator"==sa.type)Ga=!Ga;else{if("staticArr"==sa.type)sa.size=
-parseInt(O.style[sa.sizeProperty]||H[sa.sizeProperty].defVal)||0;else if(null!=sa.dependentProps){var z=sa.dependentProps,L=[],M=[];for(Oa=0;Oa<z.length;Oa++){var U=O.style[z[Oa]];M.push(H[z[Oa]].subDefVal);L.push(null!=U?U.split(","):[])}sa.dependentPropsDefVal=M;sa.dependentPropsVals=L}Ba.appendChild(xa(eb,bb,sa,$a,Ga));$a=!$a}}for(Oa=0;Oa<Ca.length;Oa++)for(sa=Ca[Oa],H=sa.parentRow,O=0;O<sa.values.length;O++)eb=xa(sa.name,sa.values[O],{type:sa.type,parentRow:sa.parentRow,isDeletable:sa.isDeletable,
-index:O,defVal:sa.defVal,countProperty:sa.countProperty,size:sa.size},0==O%2,sa.flipBkg),H.parentNode.insertBefore(eb,H.nextSibling),H=eb;u.appendChild(Ba);Sa();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(sa){mxEvent.addListener(sa,"mouseenter",function(){sa.style.opacity="1"});mxEvent.addListener(sa,"mouseleave",function(){sa.style.opacity="0.5"})}var O=this.editorUi,T=O.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
-R.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(R);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var ma=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var xa=
-document.createElement("div");xa.style.display="inline-block";xa.style.width="6px";xa.style.height="6px";xa.style.marginLeft="4px";xa.style.marginRight="3px";xa.style.borderRadius="3px";xa.style.cursor="pointer";xa.style.background="transparent";xa.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(sa){mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){ta(sa)}))})(ra);ma.push(xa);P.appendChild(xa)}var ta=mxUtils.bind(this,function(sa){null!=ma[sa]&&(null!=this.format.currentScheme&&
-null!=ma[this.format.currentScheme]&&(ma[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=sa,Aa(this.defaultColorSchemes[this.format.currentScheme]),ma[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(sa){var Oa=mxUtils.bind(this,function(Sa){var $a=mxUtils.button("",mxUtils.bind(this,function(bb){T.getModel().beginUpdate();try{for(var z=O.getSelectionState().cells,L=0;L<z.length;L++){for(var M=T.getModel().getStyle(z[L]),U=
-0;U<da.length;U++)M=mxUtils.removeStylename(M,da[U]);var X=T.getModel().isVertex(z[L])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(bb)||(M=""==Sa.fill?mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(X,mxConstants.STYLE_FILLCOLOR,null)),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(X,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(bb)||mxClient.IS_MAC&&
-mxEvent.isMetaDown(bb)||!T.getModel().isVertex(z[L])||(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(X,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(bb)||(M=""==Sa.stroke?mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(X,mxConstants.STYLE_STROKECOLOR,null)))):(M=mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(X,mxConstants.STYLE_FILLCOLOR,"#ffffff")),M=mxUtils.setStyle(M,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(X,mxConstants.STYLE_STROKECOLOR,"#000000")),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(X,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(z[L])&&(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(X,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(z[L],M)}}finally{T.getModel().endUpdate()}}));$a.className="geStyleButton";$a.style.width="36px";$a.style.height=10>=this.defaultColorSchemes.length?
-"24px":"30px";$a.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ga="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?$a.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":$a.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?$a.style.background="url('"+Dialog.prototype.noColorImage+"')":$a.style.backgroundColor=
-""==Sa.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");$a.style.border=Sa.stroke==mxConstants.NONE?Ga+" transparent":""==Sa.stroke?Ga+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ga+" "+(Sa.stroke||mxUtils.getValue(T.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&$a.setAttribute("title",Sa.title)}else{Ga=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var eb=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");$a.style.backgroundColor=Ga;$a.style.border="1px solid "+eb}$a.style.borderRadius="0";R.appendChild($a)});R.innerText="";for(var Ta=0;Ta<sa.length;Ta++)0<Ta&&0==mxUtils.mod(Ta,4)&&mxUtils.br(R),Oa(sa[Ta])});
+function(u,H,P){if(null!=H){var T=function(da){if(null!=da)if(P)for(var R=0;R<da.length;R++)H[da[R].name]=da[R];else for(var ma in H){var ra=!1;for(R=0;R<da.length;R++)if(da[R].name==ma&&da[R].type==H[ma].type){ra=!0;break}ra||delete H[ma]}},S=this.editorUi.editor.graph.view.getState(u);null!=S&&null!=S.shape&&(S.shape.commonCustomPropAdded||(S.shape.commonCustomPropAdded=!0,S.shape.customProperties=S.shape.customProperties||[],S.cell.vertex?Array.prototype.push.apply(S.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(S.shape.customProperties,Editor.commonEdgeProperties)),T(S.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{T(JSON.parse(u))}catch(da){}}};var F=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H=
+{},P=u.vertices,T=u.edges,S=0;S<P.length;S++)this.findCommonProperties(P[S],H,0==S);for(S=0;S<T.length;S++)this.findCommonProperties(T[S],H,0==P.length&&0==S);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(u,H,P){function T(W,ha,na,ua){Aa.getModel().beginUpdate();try{var pa=[],za=[];if(null!=na.index){for(var Da=[],Ma=na.parentRow.nextSibling;Ma&&Ma.getAttribute("data-pName")==W;)Da.push(Ma.getAttribute("data-pValue")),Ma=Ma.nextSibling;na.index<Da.length?null!=ua?Da.splice(ua,1):Da[na.index]=ha:Da.push(ha);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));ha=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,
+Aa.getSelectionCells()),pa.push(na.countProperty),za.push(Da.length))}Aa.setCellStyles(W,ha,Aa.getSelectionCells());pa.push(W);za.push(ha);if(null!=na.dependentProps)for(W=0;W<na.dependentProps.length;W++){var La=na.dependentPropsDefVal[W],Ua=na.dependentPropsVals[W];if(Ua.length>ha)Ua=Ua.slice(0,ha);else for(var Sa=Ua.length;Sa<ha;Sa++)Ua.push(La);Ua=Ua.join(",");Aa.setCellStyles(na.dependentProps[W],Ua,Aa.getSelectionCells());pa.push(na.dependentProps[W]);za.push(Ua)}if("function"==typeof na.onChange)na.onChange(Aa,
+ha);ta.editorUi.fireEvent(new mxEventObject("styleChanged","keys",pa,"values",za,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function S(W,ha,na){var ua=mxUtils.getOffset(u,!0),pa=mxUtils.getOffset(W,!0);ha.style.position="absolute";ha.style.left=pa.x-ua.x+"px";ha.style.top=pa.y-ua.y+"px";ha.style.width=W.offsetWidth+"px";ha.style.height=W.offsetHeight-(na?4:0)+"px";ha.style.zIndex=5}function da(W,ha,na){var ua=document.createElement("div");ua.style.width="32px";ua.style.height=
+"4px";ua.style.margin="2px";ua.style.border="1px solid black";ua.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ta,function(pa){this.editorUi.pickColor(ha,function(za){ua.style.background="none"==za?"url('"+Dialog.prototype.noColorImage+"')":za;T(W,za,na)});mxEvent.consume(pa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ua);return btn}function R(W,ha,na,ua,pa,za,Da){null!=ha&&(ha=ha.split(","),
+Ca.push({name:W,values:ha,type:na,defVal:ua,countProperty:pa,parentRow:za,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(ta,function(Ma){for(var La=za,Ua=0;null!=La.nextSibling;)if(La.nextSibling.getAttribute("data-pName")==W)La=La.nextSibling,Ua++;else break;var Sa={type:na,parentRow:za,index:Ua,isDeletable:!0,defVal:ua,countProperty:pa};Ua=xa(W,"",Sa,0==Ua%2,Da);T(W,ua,Sa);La.parentNode.insertBefore(Ua,La.nextSibling);mxEvent.consume(Ma)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function ma(W,ha,na,ua,pa,za,Da){if(0<pa){var Ma=Array(pa);ha=null!=ha?ha.split(","):[];for(var La=0;La<pa;La++)Ma[La]=null!=ha[La]?ha[La]:null!=ua?ua:"";Ca.push({name:W,values:Ma,type:na,defVal:ua,parentRow:za,flipBkg:Da,size:pa})}return document.createElement("div")}function ra(W,ha,na){var ua=document.createElement("input");ua.type="checkbox";ua.checked="1"==ha;mxEvent.addListener(ua,"change",function(){T(W,ua.checked?"1":"0",na)});return ua}function xa(W,
+ha,na,ua,pa){var za=na.dispName,Da=na.type,Ma=document.createElement("tr");Ma.className="gePropRow"+(pa?"Dark":"")+(ua?"Alt":"")+" gePropNonHeaderRow";Ma.setAttribute("data-pName",W);Ma.setAttribute("data-pValue",ha);ua=!1;null!=na.index&&(Ma.setAttribute("data-index",na.index),za=(null!=za?za:"")+"["+na.index+"]",ua=!0);var La=document.createElement("td");La.className="gePropRowCell";za=mxResources.get(za,null,za);mxUtils.write(La,za);La.setAttribute("title",za);ua&&(La.style.textAlign="right");
+Ma.appendChild(La);La=document.createElement("td");La.className="gePropRowCell";if("color"==Da)La.appendChild(da(W,ha,na));else if("bool"==Da||"boolean"==Da)La.appendChild(ra(W,ha,na));else if("enum"==Da){var Ua=na.enumList;for(pa=0;pa<Ua.length;pa++)if(za=Ua[pa],za.val==ha){mxUtils.write(La,mxResources.get(za.dispName,null,za.dispName));break}mxEvent.addListener(La,"click",mxUtils.bind(ta,function(){var Sa=document.createElement("select");S(La,Sa);for(var Fa=0;Fa<Ua.length;Fa++){var va=Ua[Fa],ya=
+document.createElement("option");ya.value=mxUtils.htmlEntities(va.val);mxUtils.write(ya,mxResources.get(va.dispName,null,va.dispName));Sa.appendChild(ya)}Sa.value=ha;u.appendChild(Sa);mxEvent.addListener(Sa,"change",function(){var Na=mxUtils.htmlEntities(Sa.value);T(W,Na,na)});Sa.focus();mxEvent.addListener(Sa,"blur",function(){u.removeChild(Sa)})}))}else"dynamicArr"==Da?La.appendChild(R(W,ha,na.subType,na.subDefVal,na.countProperty,Ma,pa)):"staticArr"==Da?La.appendChild(ma(W,ha,na.subType,na.subDefVal,
+na.size,Ma,pa)):"readOnly"==Da?(pa=document.createElement("input"),pa.setAttribute("readonly",""),pa.value=ha,pa.style.width="96px",pa.style.borderWidth="0px",La.appendChild(pa)):(La.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(La,"click",mxUtils.bind(ta,function(){function Sa(){var va=Fa.value;va=0==va.length&&"string"!=Da?0:va;na.allowAuto&&(null!=va.trim&&"auto"==va.trim().toLowerCase()?(va="auto",Da="string"):(va=parseFloat(va),va=isNaN(va)?0:va));null!=na.min&&va<
+na.min?va=na.min:null!=na.max&&va>na.max&&(va=na.max);va=encodeURIComponent(("int"==Da?parseInt(va):va)+"");T(W,va,na)}var Fa=document.createElement("input");S(La,Fa,!0);Fa.value=decodeURIComponent(ha);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(va){13==va.keyCode&&Sa()});Fa.focus();mxEvent.addListener(Fa,
+"blur",function(){Sa()})})));na.isDeletable&&(pa=mxUtils.button("-",mxUtils.bind(ta,function(Sa){T(W,"",na,na.index);mxEvent.consume(Sa)})),pa.style.height="16px",pa.style.width="25px",pa.style.float="right",pa.className="geColorBtn",La.appendChild(pa));Ma.appendChild(La);return Ma}var ta=this,Aa=this.editorUi.editor.graph,Ca=[];u.style.position="relative";u.style.padding="0";var Ba=document.createElement("table");Ba.className="geProperties";Ba.style.whiteSpace="nowrap";Ba.style.width="100%";var sa=
+document.createElement("tr");sa.className="gePropHeader";var Pa=document.createElement("th");Pa.className="gePropHeaderCell";var Ta=document.createElement("img");Ta.src=Sidebar.prototype.expandedImage;Ta.style.verticalAlign="middle";Pa.appendChild(Ta);mxUtils.write(Pa,mxResources.get("property"));sa.style.cursor="pointer";var Oa=function(){var W=Ba.querySelectorAll(".gePropNonHeaderRow");if(ta.editorUi.propertiesCollapsed){Ta.src=Sidebar.prototype.collapsedImage;var ha="none";for(var na=u.childNodes.length-
+1;0<=na;na--)try{var ua=u.childNodes[na],pa=ua.nodeName.toUpperCase();"INPUT"!=pa&&"SELECT"!=pa||u.removeChild(ua)}catch(za){}}else Ta.src=Sidebar.prototype.expandedImage,ha="";for(na=0;na<W.length;na++)W[na].style.display=ha};mxEvent.addListener(sa,"click",function(){ta.editorUi.propertiesCollapsed=!ta.editorUi.propertiesCollapsed;Oa()});sa.appendChild(Pa);Pa=document.createElement("th");Pa.className="gePropHeaderCell";Pa.innerHTML=mxResources.get("value");sa.appendChild(Pa);Ba.appendChild(sa);var Xa=
+!1,Ga=!1;sa=null;1==P.vertices.length&&0==P.edges.length?sa=P.vertices[0].id:0==P.vertices.length&&1==P.edges.length&&(sa=P.edges[0].id);null!=sa&&Ba.appendChild(xa("id",mxUtils.htmlEntities(sa),{dispName:"ID",type:"readOnly"},!0,!1));for(var eb in H)if(sa=H[eb],"function"!=typeof sa.isVisible||sa.isVisible(P,this)){var bb=null!=P.style[eb]?mxUtils.htmlEntities(P.style[eb]+""):null!=sa.getDefaultValue?sa.getDefaultValue(P,this):sa.defVal;if("separator"==sa.type)Ga=!Ga;else{if("staticArr"==sa.type)sa.size=
+parseInt(P.style[sa.sizeProperty]||H[sa.sizeProperty].defVal)||0;else if(null!=sa.dependentProps){var z=sa.dependentProps,K=[],M=[];for(Pa=0;Pa<z.length;Pa++){var U=P.style[z[Pa]];M.push(H[z[Pa]].subDefVal);K.push(null!=U?U.split(","):[])}sa.dependentPropsDefVal=M;sa.dependentPropsVals=K}Ba.appendChild(xa(eb,bb,sa,Xa,Ga));Xa=!Xa}}for(Pa=0;Pa<Ca.length;Pa++)for(sa=Ca[Pa],H=sa.parentRow,P=0;P<sa.values.length;P++)eb=xa(sa.name,sa.values[P],{type:sa.type,parentRow:sa.parentRow,isDeletable:sa.isDeletable,
+index:P,defVal:sa.defVal,countProperty:sa.countProperty,size:sa.size},0==P%2,sa.flipBkg),H.parentNode.insertBefore(eb,H.nextSibling),H=eb;u.appendChild(Ba);Oa();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(sa){mxEvent.addListener(sa,"mouseenter",function(){sa.style.opacity="1"});mxEvent.addListener(sa,"mouseleave",function(){sa.style.opacity="0.5"})}var P=this.editorUi,T=P.editor.graph,S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.paddingLeft="24px";
+S.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(S);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var ma=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var xa=
+document.createElement("div");xa.style.display="inline-block";xa.style.width="6px";xa.style.height="6px";xa.style.marginLeft="4px";xa.style.marginRight="3px";xa.style.borderRadius="3px";xa.style.cursor="pointer";xa.style.background="transparent";xa.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(sa){mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){ta(sa)}))})(ra);ma.push(xa);R.appendChild(xa)}var ta=mxUtils.bind(this,function(sa){null!=ma[sa]&&(null!=this.format.currentScheme&&
+null!=ma[this.format.currentScheme]&&(ma[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=sa,Aa(this.defaultColorSchemes[this.format.currentScheme]),ma[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(sa){var Pa=mxUtils.bind(this,function(Oa){var Xa=mxUtils.button("",mxUtils.bind(this,function(bb){T.getModel().beginUpdate();try{for(var z=P.getSelectionState().cells,K=0;K<z.length;K++){for(var M=T.getModel().getStyle(z[K]),U=
+0;U<da.length;U++)M=mxUtils.removeStylename(M,da[U]);var W=T.getModel().isVertex(z[K])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=Oa?(mxEvent.isShiftDown(bb)||(M=""==Oa.fill?mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,Oa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,Oa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(bb)||mxClient.IS_MAC&&
+mxEvent.isMetaDown(bb)||!T.getModel().isVertex(z[K])||(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,Oa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(bb)||(M=""==Oa.stroke?mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,Oa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(M=mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),M=mxUtils.setStyle(M,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(z[K])&&(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(z[K],M)}}finally{T.getModel().endUpdate()}}));Xa.className="geStyleButton";Xa.style.width="36px";Xa.style.height=10>=this.defaultColorSchemes.length?
+"24px":"30px";Xa.style.margin="0px 6px 6px 0px";if(null!=Oa){var Ga="1"==urlParams.sketch?"2px solid":"1px solid";null!=Oa.gradient?mxClient.IS_IE&&10>document.documentMode?Xa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Oa.fill+"', EndColorStr='"+Oa.gradient+"', GradientType=0)":Xa.style.backgroundImage="linear-gradient("+Oa.fill+" 0px,"+Oa.gradient+" 100%)":Oa.fill==mxConstants.NONE?Xa.style.background="url('"+Dialog.prototype.noColorImage+"')":Xa.style.backgroundColor=
+""==Oa.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Oa.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Xa.style.border=Oa.stroke==mxConstants.NONE?Ga+" transparent":""==Oa.stroke?Ga+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ga+" "+(Oa.stroke||mxUtils.getValue(T.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Oa.title&&Xa.setAttribute("title",Oa.title)}else{Ga=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var eb=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Xa.style.backgroundColor=Ga;Xa.style.border="1px solid "+eb}Xa.style.borderRadius="0";S.appendChild(Xa)});S.innerText="";for(var Ta=0;Ta<sa.length;Ta++)0<Ta&&0==mxUtils.mod(Ta,4)&&mxUtils.br(S),Pa(sa[Ta])});
null==this.format.currentScheme?ta(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ta(this.format.currentScheme);ra=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ra+"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(Ca,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ra+"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&&(u.appendChild(Ca),u.appendChild(Ba));mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(Ca);H(Ba);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(P);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),O=this.editorUi.editor.graph,T=null;1==H.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",u.appendChild(T));O=1==H.cells.length?O.view.getState(H.cells[0]):null;null!=O&&null!=O.shape&&null!=O.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
-mxResources.get("editShape")),H.style.marginBottom="2px",null==T?H.style.width="210px":(T.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==T?H.style.width="210px":(T.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
+1<this.defaultColorSchemes.length&&(u.appendChild(Ca),u.appendChild(Ba));mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(Ca);H(Ba);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(R);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),P=this.editorUi.editor.graph,T=null;1==H.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(S){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",u.appendChild(T));P=1==H.cells.length?P.view.getState(H.cells[0]):null;null!=P&&null!=P.shape&&null!=P.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(S){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
+mxResources.get("editShape")),H.style.marginBottom="2px",null==T?H.style.width="210px":(T.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(S){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==T?H.style.width="210px":(T.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
u.appendChild(H));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-H){var O=Graph.fontMapping[H];null==O&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==O&&(O='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,O));return u};Graph.addFont=function(u,H,O){if(null!=u&&0<u.length&&null!=H&&0<H.length){var T=u.toLowerCase();if("helvetica"!=T&&"arial"!=u&&"sans-serif"!=
-T){var R=Graph.customFontElements[T];null!=R&&R.url!=H&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=H,"http:"==H.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(H)),R={name:u,url:H,elt:Graph.createFontElement(u,R)},Graph.customFontElements[T]=R,Graph.recentCustomFonts[T]=R,H=document.getElementsByTagName("head")[0],null!=O&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=O,R.elt.onerror=O):O()),null!=H&&H.appendChild(R.elt)):null!=O&&O()}else null!=O&&O()}else null!=O&&O();
-return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var O=u[H].getAttribute("data-font-src");if(null!=O){var T="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=T&&Graph.addFont(T,O)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var O=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
-null);null!=O&&Graph.addFont(O,decodeURIComponent(H))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var I=Graph.prototype.init;Graph.prototype.init=function(){function u(R){H=R}I.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var H=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(R){H=null});this.isMouseInsertPoint=function(){return null!=H};var O=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):O.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var da=this.graph.getCellStyle(R);if(null!=da&&"rack"==da.childLayout){var P=new mxStackLayout(this.graph,!1);P.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;P.marginLeft=da.marginLeft||0;P.marginRight=da.marginRight||0;P.marginTop=da.marginTop||0;P.marginBottom=
-da.marginBottom||0;P.allowGaps=da.allowGaps||0;P.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");P.resizeParent=!1;P.fill=!0;return P}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,O,T,R,da,P,ma,ra,xa,ta){aa.apply(this,arguments);
-Graph.processFontAttributes(ta)};var ca=mxText.prototype.redraw;mxText.prototype.redraw=function(){ca.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,O){function T(){for(var sa=P.getSelectionCells(),Oa=[],Ta=0;Ta<sa.length;Ta++)P.isCellVisible(sa[Ta])&&Oa.push(sa[Ta]);P.setSelectionCells(Oa)}function R(sa){P.setHiddenTags(sa?[]:ma.slice());T();P.refresh()}function da(sa,Oa){xa.innerText="";if(0<
-sa.length){var Ta=document.createElement("table");Ta.setAttribute("cellpadding","2");Ta.style.boxSizing="border-box";Ta.style.tableLayout="fixed";Ta.style.width="100%";var Sa=document.createElement("tbody");if(null!=sa&&0<sa.length)for(var $a=0;$a<sa.length;$a++)(function(Ga){var eb=0>mxUtils.indexOf(P.hiddenTags,Ga),bb=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var L=document.createElement("img");L.setAttribute("src",eb?Editor.visibleImage:
-Editor.hiddenImage);L.setAttribute("title",mxResources.get(eb?"hideIt":"show",[Ga]));mxUtils.setOpacity(L,eb?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(H||Editor.isDarkMode())L.style.filter="invert(100%)";z.appendChild(L);mxEvent.addListener(L,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(P.hiddenTags,Ga)):(P.toggleHiddenTag(Ga),T(),P.refresh());mxEvent.consume(U)});bb.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
-z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ga);a=document.createElement("a");mxUtils.write(a,Ga);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,eb?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var X=P.getCellsForTags([Ga],null,null,!0);P.isEnabled()?P.setSelectionCells(X):P.highlightCells(X)}else if(eb&&0<P.hiddenTags.length)R(!0);
-else{X=ma.slice();var fa=mxUtils.indexOf(X,Ga);X.splice(fa,1);P.setHiddenTags(X);T();P.refresh()}mxEvent.consume(U)});bb.appendChild(z);if(P.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Oa){z.style.align="center";z.style.width="16px";L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("removeIt",[Ga]));mxUtils.setOpacity(L,eb?75:25);L.style.verticalAlign=
-"middle";L.style.cursor="pointer";L.style.width="16px";if(H||Editor.isDarkMode())L.style.filter="invert(100%)";mxEvent.addListener(L,"click",function(U){var X=mxUtils.indexOf(ma,Ga);0<=X&&ma.splice(X,1);P.removeTagsForCells(P.model.getDescendants(P.model.getRoot()),[Ga]);P.refresh();mxEvent.consume(U)});z.appendChild(L)}else{var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.margin="0px";M.defaultChecked=null!=Oa&&0<=mxUtils.indexOf(Oa,Ga);M.checked=M.defaultChecked;M.style.background=
-"transparent";M.setAttribute("title",mxResources.get(M.defaultChecked?"removeIt":"add",[Ga]));mxEvent.addListener(M,"change",function(U){M.checked?P.addTagsForCells(P.getSelectionCells(),[Ga]):P.removeTagsForCells(P.getSelectionCells(),[Ga]);mxEvent.consume(U)});z.appendChild(M)}bb.appendChild(z)}Sa.appendChild(bb)})(sa[$a]);Ta.appendChild(Sa);xa.appendChild(Ta)}}var P=this,ma=P.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect="none";ra.style.overflow="hidden";ra.style.padding=
-"10px";ra.style.height="100%";var xa=document.createElement("div");xa.style.boxSizing="border-box";xa.style.borderRadius="4px";xa.style.userSelect="none";xa.style.overflow="auto";xa.style.position="absolute";xa.style.left="10px";xa.style.right="10px";xa.style.top="10px";xa.style.border=P.isEnabled()?"1px solid #808080":"none";xa.style.bottom=P.isEnabled()?"48px":"10px";ra.appendChild(xa);var ta=mxUtils.button(mxResources.get("reset"),function(sa){P.setHiddenTags([]);mxEvent.isShiftDown(sa)||(ma=P.hiddenTags.slice());
-T();P.refresh()});ta.setAttribute("title",mxResources.get("reset"));ta.className="geBtn";ta.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=O&&O(ma,function(sa){ma=sa;Ca()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";P.addListener(mxEvent.ROOT,function(){ma=P.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(sa,Oa){if(u()){sa=P.getAllTags();for(Oa=0;Oa<sa.length;Oa++)0>mxUtils.indexOf(ma,sa[Oa])&&ma.push(sa[Oa]);
-ma.sort();P.isSelectionEmpty()?da(ma):da(ma,P.getCommonTagsForCells(P.getSelectionCells()))}});P.selectionModel.addListener(mxEvent.CHANGE,Ca);P.model.addListener(mxEvent.CHANGE,Ca);P.addListener(mxEvent.REFRESH,Ca);var Ba=document.createElement("div");Ba.style.boxSizing="border-box";Ba.style.whiteSpace="nowrap";Ba.style.position="absolute";Ba.style.overflow="hidden";Ba.style.bottom="0px";Ba.style.height="42px";Ba.style.right="10px";Ba.style.left="10px";P.isEnabled()&&(Ba.appendChild(ta),Ba.appendChild(Aa),
-ra.appendChild(Ba));return{div:ra,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var O=Graph.customFontElements[H];u.push({name:O.name,url:O.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var O=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,H);for(var T=0;T<O.length;T++)O[T].getAttribute("face")==u&&O[T].getAttribute("data-font-src")!=
-H&&O[T].setAttribute("data-font-src",H)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(O){null!=
-window.console&&console.log("Error in vars URL parameter: "+O)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=Z.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,O,T,R,da,P,ma,ra,xa,ta,Aa,Ca,Ba){var sa=null,Oa=null,Ta=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(sa=this.stylesheet,Oa=this.shapeForegroundColor,Ta=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,
-this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=qa.apply(this,arguments),$a=this.getCustomFonts();if(ta&&0<$a.length){var Ga=Sa.ownerDocument,eb=null!=Ga.createElementNS?Ga.createElementNS(mxConstants.NS_SVG,"style"):Ga.createElement("style");null!=Ga.setAttributeNS?eb.setAttributeNS("type","text/css"):eb.setAttribute("type","text/css");for(var bb="",z="",L=0;L<$a.length;L++){var M=$a[L].name,U=$a[L].url;Graph.isCssFontUrl(U)?bb+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+
-M+'";\nsrc: url("'+U+'");\n}\n'}eb.appendChild(Ga.createTextNode(bb+z));Sa.getElementsByTagName("defs")[0].appendChild(eb)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=sa&&(this.shapeBackgroundColor=Ta,this.shapeForegroundColor=Oa,this.stylesheet=sa,this.refresh());return Sa};var N=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(u){N.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=
-null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var Y=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){Y.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,
+H){var P=Graph.fontMapping[H];null==P&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==P&&(P='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,P));return u};Graph.addFont=function(u,H,P){if(null!=u&&0<u.length&&null!=H&&0<H.length){var T=u.toLowerCase();if("helvetica"!=T&&"arial"!=u&&"sans-serif"!=
+T){var S=Graph.customFontElements[T];null!=S&&S.url!=H&&(S.elt.parentNode.removeChild(S.elt),S=null);null==S?(S=H,"http:"==H.substring(0,5)&&(S=PROXY_URL+"?url="+encodeURIComponent(H)),S={name:u,url:H,elt:Graph.createFontElement(u,S)},Graph.customFontElements[T]=S,Graph.recentCustomFonts[T]=S,H=document.getElementsByTagName("head")[0],null!=P&&("link"==S.elt.nodeName.toLowerCase()?(S.elt.onload=P,S.elt.onerror=P):P()),null!=H&&H.appendChild(S.elt)):null!=P&&P()}else null!=P&&P()}else null!=P&&P();
+return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var P=u[H].getAttribute("data-font-src");if(null!=P){var T="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=T&&Graph.addFont(T,P)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var P=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
+null);null!=P&&Graph.addFont(P,decodeURIComponent(H))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var I=Graph.prototype.init;Graph.prototype.init=function(){function u(S){H=S}I.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var H=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(S){H=null});this.isMouseInsertPoint=function(){return null!=H};var P=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):P.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(S){var da=this.graph.getCellStyle(S);if(null!=da&&"rack"==da.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=da.marginLeft||0;R.marginRight=da.marginRight||0;R.marginTop=da.marginTop||0;R.marginBottom=
+da.marginBottom||0;R.allowGaps=da.allowGaps||0;R.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,P,T,S,da,R,ma,ra,xa,ta){Z.apply(this,arguments);
+Graph.processFontAttributes(ta)};var ca=mxText.prototype.redraw;mxText.prototype.redraw=function(){ca.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,P){function T(){for(var sa=R.getSelectionCells(),Pa=[],Ta=0;Ta<sa.length;Ta++)R.isCellVisible(sa[Ta])&&Pa.push(sa[Ta]);R.setSelectionCells(Pa)}function S(sa){R.setHiddenTags(sa?[]:ma.slice());T();R.refresh()}function da(sa,Pa){xa.innerText="";if(0<
+sa.length){var Ta=document.createElement("table");Ta.setAttribute("cellpadding","2");Ta.style.boxSizing="border-box";Ta.style.tableLayout="fixed";Ta.style.width="100%";var Oa=document.createElement("tbody");if(null!=sa&&0<sa.length)for(var Xa=0;Xa<sa.length;Xa++)(function(Ga){var eb=0>mxUtils.indexOf(R.hiddenTags,Ga),bb=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var K=document.createElement("img");K.setAttribute("src",eb?Editor.visibleImage:
+Editor.hiddenImage);K.setAttribute("title",mxResources.get(eb?"hideIt":"show",[Ga]));mxUtils.setOpacity(K,eb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";z.appendChild(K);mxEvent.addListener(K,"click",function(U){mxEvent.isShiftDown(U)?S(0<=mxUtils.indexOf(R.hiddenTags,Ga)):(R.toggleHiddenTag(Ga),T(),R.refresh());mxEvent.consume(U)});bb.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
+z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ga);a=document.createElement("a");mxUtils.write(a,Ga);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,eb?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){S(!0);var W=R.getCellsForTags([Ga],null,null,!0);R.isEnabled()?R.setSelectionCells(W):R.highlightCells(W)}else if(eb&&0<R.hiddenTags.length)S(!0);
+else{W=ma.slice();var ha=mxUtils.indexOf(W,Ga);W.splice(ha,1);R.setHiddenTags(W);T();R.refresh()}mxEvent.consume(U)});bb.appendChild(z);if(R.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Pa){z.style.align="center";z.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ga]));mxUtils.setOpacity(K,eb?75:25);K.style.verticalAlign=
+"middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(U){var W=mxUtils.indexOf(ma,Ga);0<=W&&ma.splice(W,1);R.removeTagsForCells(R.model.getDescendants(R.model.getRoot()),[Ga]);R.refresh();mxEvent.consume(U)});z.appendChild(K)}else{var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.margin="0px";M.defaultChecked=null!=Pa&&0<=mxUtils.indexOf(Pa,Ga);M.checked=M.defaultChecked;M.style.background=
+"transparent";M.setAttribute("title",mxResources.get(M.defaultChecked?"removeIt":"add",[Ga]));mxEvent.addListener(M,"change",function(U){M.checked?R.addTagsForCells(R.getSelectionCells(),[Ga]):R.removeTagsForCells(R.getSelectionCells(),[Ga]);mxEvent.consume(U)});z.appendChild(M)}bb.appendChild(z)}Oa.appendChild(bb)})(sa[Xa]);Ta.appendChild(Oa);xa.appendChild(Ta)}}var R=this,ma=R.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect="none";ra.style.overflow="hidden";ra.style.padding=
+"10px";ra.style.height="100%";var xa=document.createElement("div");xa.style.boxSizing="border-box";xa.style.borderRadius="4px";xa.style.userSelect="none";xa.style.overflow="auto";xa.style.position="absolute";xa.style.left="10px";xa.style.right="10px";xa.style.top="10px";xa.style.border=R.isEnabled()?"1px solid #808080":"none";xa.style.bottom=R.isEnabled()?"48px":"10px";ra.appendChild(xa);var ta=mxUtils.button(mxResources.get("reset"),function(sa){R.setHiddenTags([]);mxEvent.isShiftDown(sa)||(ma=R.hiddenTags.slice());
+T();R.refresh()});ta.setAttribute("title",mxResources.get("reset"));ta.className="geBtn";ta.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=P&&P(ma,function(sa){ma=sa;Ca()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";R.addListener(mxEvent.ROOT,function(){ma=R.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(sa,Pa){if(u()){sa=R.getAllTags();for(Pa=0;Pa<sa.length;Pa++)0>mxUtils.indexOf(ma,sa[Pa])&&ma.push(sa[Pa]);
+ma.sort();R.isSelectionEmpty()?da(ma):da(ma,R.getCommonTagsForCells(R.getSelectionCells()))}});R.selectionModel.addListener(mxEvent.CHANGE,Ca);R.model.addListener(mxEvent.CHANGE,Ca);R.addListener(mxEvent.REFRESH,Ca);var Ba=document.createElement("div");Ba.style.boxSizing="border-box";Ba.style.whiteSpace="nowrap";Ba.style.position="absolute";Ba.style.overflow="hidden";Ba.style.bottom="0px";Ba.style.height="42px";Ba.style.right="10px";Ba.style.left="10px";R.isEnabled()&&(Ba.appendChild(ta),Ba.appendChild(Aa),
+ra.appendChild(Ba));return{div:ra,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var P=Graph.customFontElements[H];u.push({name:P.name,url:P.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var P=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,H);for(var T=0;T<P.length;T++)P[T].getAttribute("face")==u&&P[T].getAttribute("data-font-src")!=
+H&&P[T].setAttribute("data-font-src",H)}};var aa=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return aa.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(P){null!=
+window.console&&console.log("Error in vars URL parameter: "+P)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=Y.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};
+Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,P,T,S,da,R,ma,ra,xa,ta,Aa,Ca,Ba){var sa=null,Pa=null,Ta=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(sa=this.stylesheet,Pa=this.shapeForegroundColor,Ta=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,
+this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Oa=qa.apply(this,arguments),Xa=this.getCustomFonts();if(ta&&0<Xa.length){var Ga=Oa.ownerDocument,eb=null!=Ga.createElementNS?Ga.createElementNS(mxConstants.NS_SVG,"style"):Ga.createElement("style");null!=Ga.setAttributeNS?eb.setAttributeNS("type","text/css"):eb.setAttribute("type","text/css");for(var bb="",z="",K=0;K<Xa.length;K++){var M=Xa[K].name,U=Xa[K].url;Graph.isCssFontUrl(U)?bb+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+
+M+'";\nsrc: url("'+U+'");\n}\n'}eb.appendChild(Ga.createTextNode(bb+z));Oa.getElementsByTagName("defs")[0].appendChild(eb)}this.mathEnabled&&(document.body.appendChild(Oa),Editor.MathJaxRender(Oa),Oa.parentNode.removeChild(Oa));null!=sa&&(this.shapeBackgroundColor=Ta,this.shapeForegroundColor=Pa,this.stylesheet=sa,this.refresh());return Oa};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(u){Q.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=
+null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var X=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){X.apply(this,arguments);this.enumerationState=0};var fa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return fa.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,
"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var H="1"==mxUtils.getValue(u.style,"enumerate",0);H&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
-this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var O=u.view.scale,T=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*O,u.y+4*O,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==T&&H.scale==O||(H.bounds=u,H.value=T,H.scale=O,H.redraw())}};var ka=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var P=u.view.scale,T=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*P,u.y+4*P,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==T&&H.scale==P||(H.bounds=u,H.value=T,H.scale=P,H.redraw())}};var ka=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
function(){ka.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ja=Graph.prototype.refresh;Graph.prototype.refresh=function(){ja.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=
+this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ia=Graph.prototype.refresh;Graph.prototype.refresh=function(){ia.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=
this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var V=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){V.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,
-H){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 O=!1,T=0,R=0,da=mxUtils.bind(this,function(){O||(O=!0,this.model.beginUpdate())}),P=mxUtils.bind(this,function(){O&&(O=!1,this.model.endUpdate())}),ma=mxUtils.bind(this,function(){0<T&&T--;0==
-T&&ra()}),ra=mxUtils.bind(this,function(){if(R<u.length){var xa=this.stoppingCustomActions,ta=u[R++],Aa=[];if(null!=ta.open)if(P(),this.isCustomLink(ta.open)){if(!this.customLinkClicked(ta.open))return}else this.openLink(ta.open);null==ta.wait||xa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ma()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ta.wait?parseInt(ta.wait):1E3),P());null!=ta.opacity&&
+H){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 P=!1,T=0,S=0,da=mxUtils.bind(this,function(){P||(P=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,function(){P&&(P=!1,this.model.endUpdate())}),ma=mxUtils.bind(this,function(){0<T&&T--;0==
+T&&ra()}),ra=mxUtils.bind(this,function(){if(S<u.length){var xa=this.stoppingCustomActions,ta=u[S++],Aa=[];if(null!=ta.open)if(R(),this.isCustomLink(ta.open)){if(!this.customLinkClicked(ta.open))return}else this.openLink(ta.open);null==ta.wait||xa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ma()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ta.wait?parseInt(ta.wait):1E3),R());null!=ta.opacity&&
null!=ta.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ta.opacity,!0)),ta.opacity.value);null!=ta.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeIn,!0)),0,1,ma,xa?0:ta.fadeIn.delay));null!=ta.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeOut,!0)),1,0,ma,xa?0:ta.fadeOut.delay));null!=ta.wipeIn&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeIn,!0),!0)));null!=ta.wipeOut&&
(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeOut,!0),!1)));null!=ta.toggle&&(da(),this.toggleCells(this.getCellsForAction(ta.toggle,!0)));if(null!=ta.show){da();var Ca=this.getCellsForAction(ta.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=ta.hide&&(da(),Ca=this.getCellsForAction(ta.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=ta.toggleStyle&&null!=ta.toggleStyle.key&&(da(),
this.toggleCellStyles(ta.toggleStyle.key,null!=ta.toggleStyle.defaultValue?ta.toggleStyle.defaultValue:"0",this.getCellsForAction(ta.toggleStyle,!0)));null!=ta.style&&null!=ta.style.key&&(da(),this.setCellStyles(ta.style.key,ta.style.value,this.getCellsForAction(ta.style,!0)));Ca=[];null!=ta.select&&this.isEnabled()&&(Ca=this.getCellsForAction(ta.select),this.setSelectionCells(Ca));null!=ta.highlight&&(Ca=this.getCellsForAction(ta.highlight),this.highlightCells(Ca,ta.highlight.color,ta.highlight.duration,
ta.highlight.opacity));null!=ta.scroll&&(Ca=this.getCellsForAction(ta.scroll));null!=ta.viewbox&&this.fitWindow(ta.viewbox,ta.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=ta.tags){Ca=[];null!=ta.tags.hidden&&(Ca=Ca.concat(ta.tags.hidden));if(null!=ta.tags.visible)for(var Ba=this.getAllTags(),sa=0;sa<Ba.length;sa++)0>mxUtils.indexOf(ta.tags.visible,Ba[sa])&&0>mxUtils.indexOf(Ca,Ba[sa])&&Ca.push(Ba[sa]);this.setHiddenTags(Ca);this.refresh()}0<Aa.length&&(T++,this.executeAnimations(Aa,
-ma,xa?1:ta.steps,xa?0:ta.delay));0==T?ra():P()}else this.stoppingCustomActions=this.executingCustomActions=!1,P(),null!=H&&H()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var O=this.getLinkForCell(H);null!=O&&"data:action/json,"==O.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,O));if(this.isHtmlLabel(H)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var R=T.getElementsByTagName("a"),da=!1,P=0;P<R.length;P++)O=R[P].getAttribute("href"),
-null!=O&&"data:action/json,"==O.substring(0,17)&&(R[P].setAttribute("href",this.updateCustomLink(u,O)),da=!0);da&&this.labelChanged(H,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var O=JSON.parse(H.substring(17));null!=O.actions&&(this.updateCustomLinkActions(u,O.actions),H="data:action/json,"+JSON.stringify(O))}catch(T){}return H};Graph.prototype.updateCustomLinkActions=function(u,H){for(var O=0;O<H.length;O++){var T=H[O],R;for(R in T)this.updateCustomLinkAction(u,
-T[R],"cells"),this.updateCustomLinkAction(u,T[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,O){if(null!=H&&null!=H[O]){for(var T=[],R=0;R<H[O].length;R++)if("*"==H[O][R])T.push(H[O][R]);else{var da=u[H[O][R]];null!=da?""!=da&&T.push(da):T.push(H[O][R])}H[O]=T}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=u.excludeCells){for(var O=[],T=0;T<H.length;T++)0>u.excludeCells.indexOf(H[T].id)&&
-O.push(H[T]);H=O}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var O=0;O<u.length;O++)if("*"==u[O]){var T=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(da){return da!=T},T))}else{var R=this.model.getCell(u[O]);null!=R&&H.push(R)}return H};var J=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return J.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.setHiddenTags=function(u){this.hiddenTags=
+ma,xa?1:ta.steps,xa?0:ta.delay));0==T?ra():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=H&&H()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var P=this.getLinkForCell(H);null!=P&&"data:action/json,"==P.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,P));if(this.isHtmlLabel(H)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var S=T.getElementsByTagName("a"),da=!1,R=0;R<S.length;R++)P=S[R].getAttribute("href"),
+null!=P&&"data:action/json,"==P.substring(0,17)&&(S[R].setAttribute("href",this.updateCustomLink(u,P)),da=!0);da&&this.labelChanged(H,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var P=JSON.parse(H.substring(17));null!=P.actions&&(this.updateCustomLinkActions(u,P.actions),H="data:action/json,"+JSON.stringify(P))}catch(T){}return H};Graph.prototype.updateCustomLinkActions=function(u,H){for(var P=0;P<H.length;P++){var T=H[P],S;for(S in T)this.updateCustomLinkAction(u,
+T[S],"cells"),this.updateCustomLinkAction(u,T[S],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,P){if(null!=H&&null!=H[P]){for(var T=[],S=0;S<H[P].length;S++)if("*"==H[P][S])T.push(H[P][S]);else{var da=u[H[P][S]];null!=da?""!=da&&T.push(da):T.push(H[P][S])}H[P]=T}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=u.excludeCells){for(var P=[],T=0;T<H.length;T++)0>u.excludeCells.indexOf(H[T].id)&&
+P.push(H[T]);H=P}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var P=0;P<u.length;P++)if("*"==u[P]){var T=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(da){return da!=T},T))}else{var S=this.model.getCell(u[P]);null!=S&&H.push(S)}return H};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.setHiddenTags=function(u){this.hiddenTags=
u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var H=mxUtils.indexOf(this.hiddenTags,u);0>H?this.hiddenTags.push(u):0<=H&&this.hiddenTags.splice(H,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var H=0;H<u.length;H++)if(0>mxUtils.indexOf(this.hiddenTags,u[H]))return!1;
-return!0};Graph.prototype.getCellsForTags=function(u,H,O,T){var R=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var da=0,P={},ma=0;ma<u.length;ma++)0<u[ma].length&&(P[u[ma]]=!0,da++);for(ma=0;ma<H.length;ma++)if(O&&this.model.getParent(H[ma])==this.model.root||this.model.isVertex(H[ma])||this.model.isEdge(H[ma])){var ra=this.getTagsForCell(H[ma]),xa=!1;if(0<ra.length&&(ra=ra.split(" "),ra.length>=u.length)){for(var ta=xa=0;ta<ra.length&&xa<da;ta++)null!=P[ra[ta]]&&
-xa++;xa=xa==da}xa&&(1!=T||this.isCellVisible(H[ma]))&&R.push(H[ma])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,O=[],T=0;T<u.length;T++){var R=this.getTagsForCell(u[T]);O=[];if(0<R.length){R=R.split(" ");for(var da={},P=0;P<R.length;P++)if(null==H||null!=H[R[P]])da[R[P]]=!0,O.push(R[P]);H=da}else return[]}return O};Graph.prototype.getTagsForCells=function(u){for(var H=
-[],O={},T=0;T<u.length;T++){var R=this.getTagsForCell(u[T]);if(0<R.length){R=R.split(" ");for(var da=0;da<R.length;da++)null==O[R[da]]&&(O[R[da]]=!0,H.push(R[da]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var O=0;O<u.length;O++){for(var T=this.getTagsForCell(u[O]),R=T.split(" "),da=!1,P=0;P<H.length;P++){var ma=mxUtils.trim(H[P]);""!=
-ma&&0>mxUtils.indexOf(R,ma)&&(T=0<T.length?T+" "+ma:ma,da=!0)}da&&this.setAttributeForCell(u[O],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var O=0;O<u.length;O++){var T=this.getTagsForCell(u[O]);if(0<T.length){for(var R=T.split(" "),da=!1,P=0;P<H.length;P++){var ma=mxUtils.indexOf(R,H[P]);0<=ma&&(R.splice(ma,1),da=!0)}da&&this.setAttributeForCell(u[O],"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};
-Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var O=0;O<u.length;O++)this.model.setVisible(u[O],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,O,T){for(var R=0;R<u.length;R++)this.highlightCell(u[R],H,O,T)};Graph.prototype.highlightCell=function(u,H,
-O,T,R){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;O=null!=O?O:1E3;u=this.view.getState(u);var da=null;null!=u&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+R),da=new mxCellHighlight(this,H,R,!1),null!=T&&(da.opacity=T),da.highlight(u),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition","all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},1200)},O));return da};
-Graph.prototype.addSvgShadow=function(u,H,O,T){O=null!=O?O:!1;T=null!=T?T:!0;var R=u.ownerDocument,da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");da.setAttribute("id",this.shadowId);var P=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");P.setAttribute("in","SourceAlpha");P.setAttribute("stdDeviation",this.svgShadowBlur);P.setAttribute("result","blur");da.appendChild(P);P=null!=R.createElementNS?
-R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");P.setAttribute("in","blur");P.setAttribute("dx",this.svgShadowSize);P.setAttribute("dy",this.svgShadowSize);P.setAttribute("result","offsetBlur");da.appendChild(P);P=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");P.setAttribute("flood-color",this.svgShadowColor);P.setAttribute("flood-opacity",this.svgShadowOpacity);P.setAttribute("result","offsetColor");da.appendChild(P);
-P=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");P.setAttribute("in","offsetColor");P.setAttribute("in2","offsetBlur");P.setAttribute("operator","in");P.setAttribute("result","offsetBlur");da.appendChild(P);P=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");P.setAttribute("in","SourceGraphic");P.setAttribute("in2","offsetBlur");da.appendChild(P);P=u.getElementsByTagName("defs");0==P.length?
-(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=u.firstChild?u.insertBefore(R,u.firstChild):u.appendChild(R)):R=P[0];R.appendChild(da);O||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&T&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),H=u.getAttribute("viewBox"),null!=H&&
+return!0};Graph.prototype.getCellsForTags=function(u,H,P,T){var S=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var da=0,R={},ma=0;ma<u.length;ma++)0<u[ma].length&&(R[u[ma]]=!0,da++);for(ma=0;ma<H.length;ma++)if(P&&this.model.getParent(H[ma])==this.model.root||this.model.isVertex(H[ma])||this.model.isEdge(H[ma])){var ra=this.getTagsForCell(H[ma]),xa=!1;if(0<ra.length&&(ra=ra.split(" "),ra.length>=u.length)){for(var ta=xa=0;ta<ra.length&&xa<da;ta++)null!=R[ra[ta]]&&
+xa++;xa=xa==da}xa&&(1!=T||this.isCellVisible(H[ma]))&&S.push(H[ma])}}return S};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,P=[],T=0;T<u.length;T++){var S=this.getTagsForCell(u[T]);P=[];if(0<S.length){S=S.split(" ");for(var da={},R=0;R<S.length;R++)if(null==H||null!=H[S[R]])da[S[R]]=!0,P.push(S[R]);H=da}else return[]}return P};Graph.prototype.getTagsForCells=function(u){for(var H=
+[],P={},T=0;T<u.length;T++){var S=this.getTagsForCell(u[T]);if(0<S.length){S=S.split(" ");for(var da=0;da<S.length;da++)null==P[S[da]]&&(P[S[da]]=!0,H.push(S[da]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){for(var T=this.getTagsForCell(u[P]),S=T.split(" "),da=!1,R=0;R<H.length;R++){var ma=mxUtils.trim(H[R]);""!=
+ma&&0>mxUtils.indexOf(S,ma)&&(T=0<T.length?T+" "+ma:ma,da=!0)}da&&this.setAttributeForCell(u[P],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){var T=this.getTagsForCell(u[P]);if(0<T.length){for(var S=T.split(" "),da=!1,R=0;R<H.length;R++){var ma=mxUtils.indexOf(S,H[R]);0<=ma&&(S.splice(ma,1),da=!0)}da&&this.setAttributeForCell(u[P],"tags",S.join(" "))}}}finally{this.model.endUpdate()}}};
+Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var P=0;P<u.length;P++)this.model.setVisible(u[P],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,P,T){for(var S=0;S<u.length;S++)this.highlightCell(u[S],H,P,T)};Graph.prototype.highlightCell=function(u,H,
+P,T,S){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;P=null!=P?P:1E3;u=this.view.getState(u);var da=null;null!=u&&(S=null!=S?S:4,S=Math.max(S+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+S),da=new mxCellHighlight(this,H,S,!1),null!=T&&(da.opacity=T),da.highlight(u),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition","all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},1200)},P));return da};
+Graph.prototype.addSvgShadow=function(u,H,P,T){P=null!=P?P:!1;T=null!=T?T:!0;var S=u.ownerDocument,da=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"filter"):S.createElement("filter");da.setAttribute("id",this.shadowId);var R=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):S.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",this.svgShadowBlur);R.setAttribute("result","blur");da.appendChild(R);R=null!=S.createElementNS?
+S.createElementNS(mxConstants.NS_SVG,"feOffset"):S.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result","offsetBlur");da.appendChild(R);R=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feFlood"):S.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",this.svgShadowOpacity);R.setAttribute("result","offsetColor");da.appendChild(R);
+R=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feComposite"):S.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");R.setAttribute("result","offsetBlur");da.appendChild(R);R=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feBlend"):S.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2","offsetBlur");da.appendChild(R);R=u.getElementsByTagName("defs");0==R.length?
+(S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=u.firstChild?u.insertBefore(S,u.firstChild):u.appendChild(S)):S=R[0];S.appendChild(da);P||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&T&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),H=u.getAttribute("viewBox"),null!=H&&
0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return da};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==
-this.defaultParent){var u=this.model.getChildCount(this.model.root),H=0;do var O=this.model.getChildAt(this.model.root,H);while(H++<u&&"1"==mxUtils.getValue(this.getCellStyle(O),"locked","0"));null!=O&&this.setDefaultParent(O)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
+this.defaultParent){var u=this.model.getChildCount(this.model.root),H=0;do var P=this.model.getChildAt(this.model.root,H);while(H++<u&&"1"==mxUtils.getValue(this.getCellStyle(P),"locked","0"));null!=P&&this.setDefaultParent(P)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
@@ -3327,35 +3328,36 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var W=mxMarker.createMarker;mxMarker.createMarker=
-function(u,H,O,T,R,da,P,ma,ra,xa){if(null!=O&&null==mxMarker.markers[O]){var ta=this.getPackageForType(O);null!=ta&&mxStencilRegistry.getStencil(ta)}return W.apply(this,arguments)};var Q=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,O,T,R,da){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return Q.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function O(){Ca.value=Math.max(1,
-Math.min(ma,Math.max(parseInt(Ca.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(ma,Math.min(parseInt(Ca.value),parseInt(Aa.value))))}function T(za){function Da(ab,db,kb){var ib=ab.useCssTransforms,nb=ab.currentTranslate,vb=ab.currentScale,mb=ab.view.translate,Bb=ab.view.scale;ab.useCssTransforms&&(ab.useCssTransforms=!1,ab.currentTranslate=new mxPoint(0,0),ab.currentScale=1,ab.view.translate=new mxPoint(0,0),ab.view.scale=1);var yb=ab.getGraphBounds(),lb=0,ob=0,gb=ua.get(),rb=1/ab.pageScale,
-tb=Sa.checked;if(tb){rb=parseInt(fa.value);var zb=parseInt(na.value);rb=Math.min(gb.height*zb/(yb.height/ab.view.scale),gb.width*rb/(yb.width/ab.view.scale))}else rb=parseInt(Ta.value)/(100*ab.pageScale),isNaN(rb)&&(Ma=1/ab.pageScale,Ta.value="100 %");gb=mxRectangle.fromRectangle(gb);gb.width=Math.ceil(gb.width*Ma);gb.height=Math.ceil(gb.height*Ma);rb*=Ma;!tb&&ab.pageVisible?(yb=ab.getPageLayout(),lb-=yb.x*gb.width,ob-=yb.y*gb.height):tb=!0;if(null==db){db=PrintDialog.createPrintPreview(ab,rb,gb,
-0,lb,ob,tb);db.pageSelector=!1;db.mathEnabled=!1;Ba.checked&&(db.isCellVisible=function(pb){return ab.isCellSelected(pb)});lb=u.getCurrentFile();null!=lb&&(db.title=lb.getTitle());var wb=db.writeHead;db.writeHead=function(pb){wb.apply(this,arguments);null!=u.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(u.editor.fontCss),pb.writeln("</style>"));for(var xb=ab.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?pb.writeln('<link rel="stylesheet" href="'+
-mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),pb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=db.renderPage;db.renderPage=function(pb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}lb=
-null;ob=R.shapeForegroundColor;tb=R.shapeBackgroundColor;gb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(lb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());db.open(null,null,kb,!0);R.enableFlowAnimation=gb;null!=lb&&(R.shapeForegroundColor=ob,R.shapeBackgroundColor=tb,R.stylesheet=lb,R.refresh())}else{gb=ab.background;if(null==gb||""==gb||gb==mxConstants.NONE)gb="#ffffff";
-db.backgroundColor=gb;db.autoOrigin=tb;db.appendGraph(ab,rb,lb,ob,kb,!0);kb=ab.getCustomFonts();if(null!=db.wnd)for(lb=0;lb<kb.length;lb++)ob=kb[lb].name,tb=kb[lb].url,Graph.isCssFontUrl(tb)?db.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(db.wnd.document.writeln('<style type="text/css">'),db.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ob)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),db.wnd.document.writeln("</style>"))}ib&&
-(ab.useCssTransforms=ib,ab.currentTranslate=nb,ab.currentScale=vb,ab.view.translate=mb,ab.view.scale=Bb);return db}var Ma=parseInt(pa.value)/100;isNaN(Ma)&&(Ma=1,pa.value="100 %");Ma*=.75;var La=null,Ua=R.shapeForegroundColor,Ra=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(La=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Fa=Aa.value,va=Ca.value,ya=!xa.checked,Na=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,
-xa.checked,Fa,va,Sa.checked,fa.value,na.value,parseInt(Ta.value)/100,parseInt(pa.value)/100,ua.get());else{ya&&(ya=Ba.checked||Fa==ra&&va==ra);if(!ya&&null!=u.pages&&u.pages.length){var Ja=0;ya=u.pages.length-1;xa.checked||(Ja=parseInt(Fa)-1,ya=parseInt(va)-1);for(var Pa=Ja;Pa<=ya;Pa++){var Ya=u.pages[Pa];Fa=Ya==u.currentPage?R:null;if(null==Fa){Fa=u.createTemporaryGraph(R.stylesheet);Fa.shapeForegroundColor=R.shapeForegroundColor;Fa.shapeBackgroundColor=R.shapeBackgroundColor;va=!0;Ja=!1;var cb=
-null,fb=null;null==Ya.viewState&&null==Ya.root&&u.updatePageRoot(Ya);null!=Ya.viewState&&(va=Ya.viewState.pageVisible,Ja=Ya.viewState.mathEnabled,cb=Ya.viewState.background,fb=Ya.viewState.backgroundImage,Fa.extFonts=Ya.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=u.createImageForPageLink(fb.originalSrc,Ya));Fa.background=cb;Fa.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Fa.pageVisible=va;Fa.mathEnabled=Ja;var qb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var ab=
-qb.apply(this,arguments),db=this.backgroundImage;if(null!=db&&null!=db.width&&null!=db.height){var kb=this.view.translate,ib=this.view.scale;ab=mxRectangle.fromRectangle(ab);ab.add(new mxRectangle((kb.x+db.x)*ib,(kb.y+db.y)*ib,db.width*ib,db.height*ib))}return ab};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(ab){return"page"==ab?Ya.getName():"pagenumber"==ab?Pa+1:"pagecount"==ab?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Ya);
-Fa.model.setRoot(Ya.root)}Na=Da(Fa,Na,Pa!=ya);Fa!=R&&Fa.container.parentNode.removeChild(Fa.container)}}else Na=Da(R);null==Na?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Na.mathEnabled&&(ya=Na.wnd.document,za&&(Na.wnd.IMMEDIATE_PRINT=!0),ya.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Na.closeDocument(),!Na.mathEnabled&&za&&PrintDialog.printPreview(Na));null!=La&&(R.shapeForegroundColor=Ua,R.shapeBackgroundColor=Ra,R.stylesheet=
-La,R.refresh())}}var R=u.editor.graph,da=document.createElement("div"),P=document.createElement("h3");P.style.width="100%";P.style.textAlign="center";P.style.marginTop="0px";mxUtils.write(P,H||mxResources.get("print"));da.appendChild(P);var ma=1,ra=1;P=document.createElement("div");P.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var xa=document.createElement("input");xa.style.cssText="margin-right:8px;margin-bottom:8px;";xa.setAttribute("value","all");xa.setAttribute("type",
-"radio");xa.setAttribute("name","pages-printdialog");P.appendChild(xa);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));P.appendChild(H);mxUtils.br(P);var ta=xa.cloneNode(!0);xa.setAttribute("checked","checked");ta.setAttribute("value","range");P.appendChild(ta);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");P.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type",
-"number");Aa.setAttribute("min","1");Aa.style.width="50px";P.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));P.appendChild(H);var Ca=Aa.cloneNode(!0);P.appendChild(Ca);mxEvent.addListener(Aa,"focus",function(){ta.checked=!0});mxEvent.addListener(Ca,"focus",function(){ta.checked=!0});mxEvent.addListener(Aa,"change",O);mxEvent.addListener(Ca,"change",O);if(null!=u.pages&&(ma=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){ra=
-H+1;Aa.value=ra;Ca.value=ra;break}Aa.setAttribute("max",ma);Ca.setAttribute("max",ma);u.isPagesEnabled()?1<ma&&(da.appendChild(P),ta.checked=!0):ta.checked=!0;mxUtils.br(P);var Ba=document.createElement("input");Ba.setAttribute("value","all");Ba.setAttribute("type","radio");Ba.style.marginRight="8px";R.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");var sa=document.createElement("div");sa.style.marginBottom="10px";1==ma?(Ba.setAttribute("type","checkbox"),Ba.style.marginBottom="12px",sa.appendChild(Ba)):
-(Ba.setAttribute("name","pages-printdialog"),Ba.style.marginBottom="8px",P.appendChild(Ba));H=document.createElement("span");mxUtils.write(H,mxResources.get("selectionOnly"));Ba.parentNode.appendChild(H);1==ma&&mxUtils.br(Ba.parentNode);var Oa=document.createElement("input");Oa.style.marginRight="8px";Oa.setAttribute("value","adjust");Oa.setAttribute("type","radio");Oa.setAttribute("name","printZoom");sa.appendChild(Oa);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));
-sa.appendChild(H);var Ta=document.createElement("input");Ta.style.cssText="margin:0 8px 0 8px;";Ta.setAttribute("value","100 %");Ta.style.width="50px";sa.appendChild(Ta);mxEvent.addListener(Ta,"focus",function(){Oa.checked=!0});da.appendChild(sa);P=P.cloneNode(!1);var Sa=Oa.cloneNode(!0);Sa.setAttribute("value","fit");Oa.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Sa);P.appendChild(H);sa=
-document.createElement("table");sa.style.display="inline-block";var $a=document.createElement("tbody"),Ga=document.createElement("tr"),eb=Ga.cloneNode(!0),bb=document.createElement("td"),z=bb.cloneNode(!0),L=bb.cloneNode(!0),M=bb.cloneNode(!0),U=bb.cloneNode(!0),X=bb.cloneNode(!0);bb.style.textAlign="right";M.style.textAlign="right";mxUtils.write(bb,mxResources.get("fitTo"));var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("min",
-"1");fa.setAttribute("type","number");fa.style.width="40px";z.appendChild(fa);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));L.appendChild(H);mxUtils.write(M,mxResources.get("fitToBy"));var na=fa.cloneNode(!0);U.appendChild(na);mxEvent.addListener(fa,"focus",function(){Sa.checked=!0});mxEvent.addListener(na,"focus",function(){Sa.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));X.appendChild(H);Ga.appendChild(bb);
-Ga.appendChild(z);Ga.appendChild(L);eb.appendChild(M);eb.appendChild(U);eb.appendChild(X);$a.appendChild(Ga);$a.appendChild(eb);sa.appendChild($a);P.appendChild(sa);da.appendChild(P);P=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));P.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var ua=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);P.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));P.appendChild(H);var pa=document.createElement("input");pa.style.cssText="margin:0 8px 0 8px;";pa.setAttribute("value","100 %");pa.style.width="60px";P.appendChild(pa);da.appendChild(P);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";P=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});P.className="geBtn";u.editor.cancelFirst&&
-H.appendChild(P);u.isOffline()||(sa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),sa.className="geBtn",H.appendChild(sa));PrintDialog.previewEnabled&&(sa=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();T(!1)}),sa.className="geBtn",H.appendChild(sa));sa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();T(!0)});sa.className="geBtn gePrimaryBtn";H.appendChild(sa);u.editor.cancelFirst||
-H.appendChild(P);da.appendChild(H);this.container=da};var S=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else S.apply(this,arguments),null!=this.mathEnabled&&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 ha=document.createElement("canvas"),la=new Image;la.onload=function(){try{ha.getContext("2d").drawImage(la,0,0);var u=ha.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var ea=mxMarker.createMarker;mxMarker.createMarker=
+function(u,H,P,T,S,da,R,ma,ra,xa){if(null!=P&&null==mxMarker.markers[P]){var ta=this.getPackageForType(P);null!=ta&&mxStencilRegistry.getStencil(ta)}return ea.apply(this,arguments)};var O=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,P,T,S,da){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return O.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function P(){Ca.value=
+Math.max(1,Math.min(ma,Math.max(parseInt(Ca.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(ma,Math.min(parseInt(Ca.value),parseInt(Aa.value))))}function T(za){function Da(ab,db,kb){var ib=ab.useCssTransforms,ob=ab.currentTranslate,vb=ab.currentScale,nb=ab.view.translate,Bb=ab.view.scale;ab.useCssTransforms&&(ab.useCssTransforms=!1,ab.currentTranslate=new mxPoint(0,0),ab.currentScale=1,ab.view.translate=new mxPoint(0,0),ab.view.scale=1);var yb=ab.getGraphBounds(),mb=0,pb=0,gb=ua.get(),rb=
+1/ab.pageScale,tb=Oa.checked;if(tb){rb=parseInt(ha.value);var zb=parseInt(na.value);rb=Math.min(gb.height*zb/(yb.height/ab.view.scale),gb.width*rb/(yb.width/ab.view.scale))}else rb=parseInt(Ta.value)/(100*ab.pageScale),isNaN(rb)&&(Ma=1/ab.pageScale,Ta.value="100 %");gb=mxRectangle.fromRectangle(gb);gb.width=Math.ceil(gb.width*Ma);gb.height=Math.ceil(gb.height*Ma);rb*=Ma;!tb&&ab.pageVisible?(yb=ab.getPageLayout(),mb-=yb.x*gb.width,pb-=yb.y*gb.height):tb=!0;if(null==db){db=PrintDialog.createPrintPreview(ab,
+rb,gb,0,mb,pb,tb);db.pageSelector=!1;db.mathEnabled=!1;Ba.checked&&(db.isCellVisible=function(lb){return ab.isCellSelected(lb)});mb=u.getCurrentFile();null!=mb&&(db.title=mb.getTitle());var wb=db.writeHead;db.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
+lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=ab.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=db.renderPage;db.renderPage=
+function(lb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}mb=null;pb=S.shapeForegroundColor;tb=S.shapeBackgroundColor;gb=S.enableFlowAnimation;S.enableFlowAnimation=!1;null!=S.themes&&"darkTheme"==S.defaultThemeName&&(mb=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());db.open(null,null,
+kb,!0);S.enableFlowAnimation=gb;null!=mb&&(S.shapeForegroundColor=pb,S.shapeBackgroundColor=tb,S.stylesheet=mb,S.refresh())}else{gb=ab.background;if(null==gb||""==gb||gb==mxConstants.NONE)gb="#ffffff";db.backgroundColor=gb;db.autoOrigin=tb;db.appendGraph(ab,rb,mb,pb,kb,!0);kb=ab.getCustomFonts();if(null!=db.wnd)for(mb=0;mb<kb.length;mb++)pb=kb[mb].name,tb=kb[mb].url,Graph.isCssFontUrl(tb)?db.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
+(db.wnd.document.writeln('<style type="text/css">'),db.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),db.wnd.document.writeln("</style>"))}ib&&(ab.useCssTransforms=ib,ab.currentTranslate=ob,ab.currentScale=vb,ab.view.translate=nb,ab.view.scale=Bb);return db}var Ma=parseInt(pa.value)/100;isNaN(Ma)&&(Ma=1,pa.value="100 %");Ma*=.75;var La=null,Ua=S.shapeForegroundColor,Sa=S.shapeBackgroundColor;null!=S.themes&&"darkTheme"==
+S.defaultThemeName&&(La=S.stylesheet,S.stylesheet=S.getDefaultStylesheet(),S.shapeForegroundColor="#000000",S.shapeBackgroundColor="#ffffff",S.refresh());var Fa=Aa.value,va=Ca.value,ya=!xa.checked,Na=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,xa.checked,Fa,va,Oa.checked,ha.value,na.value,parseInt(Ta.value)/100,parseInt(pa.value)/100,ua.get());else{ya&&(ya=Ba.checked||Fa==ra&&va==ra);if(!ya&&null!=u.pages&&u.pages.length){var Ja=0;ya=u.pages.length-1;xa.checked||(Ja=parseInt(Fa)-1,
+ya=parseInt(va)-1);for(var Qa=Ja;Qa<=ya;Qa++){var Za=u.pages[Qa];Fa=Za==u.currentPage?S:null;if(null==Fa){Fa=u.createTemporaryGraph(S.stylesheet);Fa.shapeForegroundColor=S.shapeForegroundColor;Fa.shapeBackgroundColor=S.shapeBackgroundColor;va=!0;Ja=!1;var cb=null,fb=null;null==Za.viewState&&null==Za.root&&u.updatePageRoot(Za);null!=Za.viewState&&(va=Za.viewState.pageVisible,Ja=Za.viewState.mathEnabled,cb=Za.viewState.background,fb=Za.viewState.backgroundImage,Fa.extFonts=Za.viewState.extFonts);null!=
+fb&&null!=fb.originalSrc&&(fb=u.createImageForPageLink(fb.originalSrc,Za));Fa.background=cb;Fa.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Fa.pageVisible=va;Fa.mathEnabled=Ja;var qb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var ab=qb.apply(this,arguments),db=this.backgroundImage;if(null!=db&&null!=db.width&&null!=db.height){var kb=this.view.translate,ib=this.view.scale;ab=mxRectangle.fromRectangle(ab);ab.add(new mxRectangle((kb.x+db.x)*ib,(kb.y+db.y)*ib,db.width*
+ib,db.height*ib))}return ab};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(ab){return"page"==ab?Za.getName():"pagenumber"==ab?Qa+1:"pagecount"==ab?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Za);Fa.model.setRoot(Za.root)}Na=Da(Fa,Na,Qa!=ya);Fa!=S&&Fa.container.parentNode.removeChild(Fa.container)}}else Na=Da(S);null==Na?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Na.mathEnabled&&(ya=Na.wnd.document,
+za&&(Na.wnd.IMMEDIATE_PRINT=!0),ya.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Na.closeDocument(),!Na.mathEnabled&&za&&PrintDialog.printPreview(Na));null!=La&&(S.shapeForegroundColor=Ua,S.shapeBackgroundColor=Sa,S.stylesheet=La,S.refresh())}}var S=u.editor.graph,da=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,H||mxResources.get("print"));da.appendChild(R);
+var ma=1,ra=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var xa=document.createElement("input");xa.style.cssText="margin-right:8px;margin-bottom:8px;";xa.setAttribute("value","all");xa.setAttribute("type","radio");xa.setAttribute("name","pages-printdialog");R.appendChild(xa);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));R.appendChild(H);mxUtils.br(R);var ta=xa.cloneNode(!0);xa.setAttribute("checked",
+"checked");ta.setAttribute("value","range");R.appendChild(ta);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");R.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type","number");Aa.setAttribute("min","1");Aa.style.width="50px";R.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));R.appendChild(H);var Ca=Aa.cloneNode(!0);R.appendChild(Ca);mxEvent.addListener(Aa,
+"focus",function(){ta.checked=!0});mxEvent.addListener(Ca,"focus",function(){ta.checked=!0});mxEvent.addListener(Aa,"change",P);mxEvent.addListener(Ca,"change",P);if(null!=u.pages&&(ma=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){ra=H+1;Aa.value=ra;Ca.value=ra;break}Aa.setAttribute("max",ma);Ca.setAttribute("max",ma);u.isPagesEnabled()?1<ma&&(da.appendChild(R),ta.checked=!0):ta.checked=!0;mxUtils.br(R);var Ba=document.createElement("input");Ba.setAttribute("value",
+"all");Ba.setAttribute("type","radio");Ba.style.marginRight="8px";S.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");var sa=document.createElement("div");sa.style.marginBottom="10px";1==ma?(Ba.setAttribute("type","checkbox"),Ba.style.marginBottom="12px",sa.appendChild(Ba)):(Ba.setAttribute("name","pages-printdialog"),Ba.style.marginBottom="8px",R.appendChild(Ba));H=document.createElement("span");mxUtils.write(H,mxResources.get("selectionOnly"));Ba.parentNode.appendChild(H);1==ma&&mxUtils.br(Ba.parentNode);
+var Pa=document.createElement("input");Pa.style.marginRight="8px";Pa.setAttribute("value","adjust");Pa.setAttribute("type","radio");Pa.setAttribute("name","printZoom");sa.appendChild(Pa);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));sa.appendChild(H);var Ta=document.createElement("input");Ta.style.cssText="margin:0 8px 0 8px;";Ta.setAttribute("value","100 %");Ta.style.width="50px";sa.appendChild(Ta);mxEvent.addListener(Ta,"focus",function(){Pa.checked=!0});da.appendChild(sa);
+R=R.cloneNode(!1);var Oa=Pa.cloneNode(!0);Oa.setAttribute("value","fit");Pa.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Oa);R.appendChild(H);sa=document.createElement("table");sa.style.display="inline-block";var Xa=document.createElement("tbody"),Ga=document.createElement("tr"),eb=Ga.cloneNode(!0),bb=document.createElement("td"),z=bb.cloneNode(!0),K=bb.cloneNode(!0),M=bb.cloneNode(!0),U=
+bb.cloneNode(!0),W=bb.cloneNode(!0);bb.style.textAlign="right";M.style.textAlign="right";mxUtils.write(bb,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min","1");ha.setAttribute("type","number");ha.style.width="40px";z.appendChild(ha);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));K.appendChild(H);mxUtils.write(M,mxResources.get("fitToBy"));var na=ha.cloneNode(!0);
+U.appendChild(na);mxEvent.addListener(ha,"focus",function(){Oa.checked=!0});mxEvent.addListener(na,"focus",function(){Oa.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));W.appendChild(H);Ga.appendChild(bb);Ga.appendChild(z);Ga.appendChild(K);eb.appendChild(M);eb.appendChild(U);eb.appendChild(W);Xa.appendChild(Ga);Xa.appendChild(eb);sa.appendChild(Xa);R.appendChild(sa);da.appendChild(R);R=document.createElement("div");H=document.createElement("div");
+H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));R.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var ua=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);R.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));R.appendChild(H);var pa=document.createElement("input");pa.style.cssText="margin:0 8px 0 8px;";pa.setAttribute("value",
+"100 %");pa.style.width="60px";R.appendChild(pa);da.appendChild(R);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";R=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});R.className="geBtn";u.editor.cancelFirst&&H.appendChild(R);u.isOffline()||(sa=mxUtils.button(mxResources.get("help"),function(){S.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),sa.className="geBtn",H.appendChild(sa));PrintDialog.previewEnabled&&(sa=mxUtils.button(mxResources.get("preview"),
+function(){u.hideDialog();T(!1)}),sa.className="geBtn",H.appendChild(sa));sa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();T(!0)});sa.className="geBtn gePrimaryBtn";H.appendChild(sa);u.editor.cancelFirst||H.appendChild(R);da.appendChild(H);this.container=da};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else N.apply(this,arguments),null!=this.mathEnabled&&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 ba=document.createElement("canvas"),la=new Image;la.onload=function(){try{ba.getContext("2d").drawImage(la,0,0);var u=ba.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};
+la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.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(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.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(d,f,g,m,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -3371,7 +3373,7 @@ d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prot
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,I){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=I&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var aa=function(){};this.active&&(aa=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return aa}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var Z=function(){};this.active&&(Z=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return Z}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(y){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
@@ -3380,10 +3382,10 @@ var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
y?mxUtils.getXml(y):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;
f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(m[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,m,q,y,F,C,I,G,aa){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ca=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else ca=ba=m;if(null==d)return"";var Z=d;if("mxfile"!=Z.nodeName.toLowerCase()){if(aa){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Z=Graph.compress(qa);if(Graph.decompress(Z)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
-qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,Z)}Z=d.ownerDocument.createElement("mxfile");Z.appendChild(qa)}G?(Z=Z.cloneNode(!0),Z.removeAttribute("modified"),Z.removeAttribute("host"),Z.removeAttribute("agent"),Z.removeAttribute("etag"),Z.removeAttribute("userAgent"),Z.removeAttribute("version"),Z.removeAttribute("editor"),Z.removeAttribute("type")):(Z.removeAttribute("userAgent"),Z.removeAttribute("version"),Z.removeAttribute("editor"),Z.removeAttribute("pages"),Z.removeAttribute("type"),
-mxClient.IS_CHROMEAPP?Z.setAttribute("host","Chrome"):EditorUi.isElectronApp?Z.setAttribute("host","Electron"):Z.setAttribute("host",window.location.hostname),Z.setAttribute("modified",(new Date).toISOString()),Z.setAttribute("agent",navigator.appVersion),Z.setAttribute("version",EditorUi.VERSION),Z.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Z.setAttribute("type",d),1<Z.getElementsByTagName("diagram").length&&null!=this.pages&&Z.setAttribute("pages",this.pages.length));
-aa=aa?mxUtils.getPrettyXml(Z):mxUtils.getXml(Z);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))aa=this.getHtml2(mxUtils.getXml(Z),f,null!=g?g.getTitle():null,ba,ca);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),aa=this.getEmbeddedSvg(aa,f,m,null,C,I,ca);return aa};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+function(d,f,g,m,q,y,F,C,I,G,Z){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ca=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var aa="_blank";else ca=aa=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(Z){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(qa);if(Graph.decompress(Y)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
+qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(qa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
+mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
+Z=Z?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Z=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,aa,ca);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),Z=this.getEmbeddedSvg(Z,f,m,null,C,I,ca);return Z};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var G=I.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&I.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(G)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else m&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,m),F=F.cloneNode(!1),mxUtils.setTextContent(F,
@@ -3393,9 +3395,9 @@ function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSER
delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,I,G,aa){q=null!=q?q:!0;y=null!=y?y:!1;var ca=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var ba=null!=ca.themes&&"darkTheme"==ca.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Z=ca.getGlobalVariable;ca=this.createTemporaryGraph(ba?ca.getDefaultStylesheet():ca.getStylesheet());
-ca.setBackgroundImage=this.editor.graph.setBackgroundImage;ca.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?ca.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&ca.setBackgroundImage(qa.viewState.backgroundImage);ca.getGlobalVariable=function(N){return"page"==N?qa.getName():"pagenumber"==N?1:Z.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
-G,aa);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ca,I,window.location.href,d,f,g,m,q,C,G);ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;y=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,I,G,Z){q=null!=q?q:!0;y=null!=y?y:!1;var ca=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var aa=null!=ca.themes&&"darkTheme"==ca.defaultThemeName;G=!1;if(aa||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=ca.getGlobalVariable;ca=this.createTemporaryGraph(aa?ca.getDefaultStylesheet():ca.getStylesheet());
+ca.setBackgroundImage=this.editor.graph.setBackgroundImage;ca.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?ca.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&ca.setBackgroundImage(qa.viewState.backgroundImage);ca.getGlobalVariable=function(Q){return"page"==Q?qa.getName():"pagenumber"==Q?1:Y.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
+G,Z);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ca,I,window.location.href,d,f,g,m,q,C,G);ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;y=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3405,19 +3407,19 @@ function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage
"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var y=this.editor.graph.getModel(),
F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[m];y.setVisible(C,f[C.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,I,G,aa,ca){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Z=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Z,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
-ba),this.saveData(Z,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Z=ba+".png";else if("jpeg"==d)Z=ba+".jpg";else if("remoteSvg"==d){Z=ba+".svg";d="svg";var N=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<N){var Y=this.editor.graph,ea=Y.getGraphBounds();var ka=Math.ceil(ea.width*C/Y.view.scale+2*N);var ja=Math.ceil(ea.height*C/Y.view.scale+2*N)}}this.saveRequest(Z,d,mxUtils.bind(this,function(S,
-ha){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var u=this.createDownloadRequest(S,d,m,ha,F,q,C,I,G,aa,ca,ka,ja);this.editor.graph.pageVisible=la;return u}catch(H){this.handleError(H)}}))}else{var V=null,J=mxUtils.bind(this,function(S){S.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==d){var W=this.editor.graph.background;
-if(F||W==mxConstants.NONE)W=null;var Q=this.editor.graph.getSvg(W,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(Q);this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(S){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(S))})))}else Z=ba+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(S){this.spinner.stop();J(S)}),m)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,I,
-G,aa,ca,ba){var Z=this.editor.graph,qa=Z.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var N="",Y="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=aa?Y="&from="+aa.from+"&to="+aa.to:0==y&&(Y="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
-this.currentPage){N="&from="+y;break}y=Z.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Z.getExportVariables()};I&&(q.grid={size:Z.gridSize,steps:Z.view.gridSteps,color:Z.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+N+Y+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ca&&isFinite(ca)?"&w="+ca:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
+0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,I,G,Z,ca){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var aa=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=aa+("xml"==d||"pdf"==d&&Z?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
+aa),this.saveData(Y,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=aa+".png";else if("jpeg"==d)Y=aa+".jpg";else if("remoteSvg"==d){Y=aa+".svg";d="svg";var Q=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<Q){var X=this.editor.graph,fa=X.getGraphBounds();var ka=Math.ceil(fa.width*C/X.view.scale+2*Q);var ia=Math.ceil(fa.height*C/X.view.scale+2*Q)}}this.saveRequest(Y,d,mxUtils.bind(this,function(N,
+ba){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var u=this.createDownloadRequest(N,d,m,ba,F,q,C,I,G,Z,ca,ka,ia);this.editor.graph.pageVisible=la;return u}catch(H){this.handleError(H)}}))}else{var V=null,L=mxUtils.bind(this,function(N){N.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==d){var ea=this.editor.graph.background;
+if(F||ea==mxConstants.NONE)ea=null;var O=this.editor.graph.getSvg(ea,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(O);this.editor.convertImages(O,mxUtils.bind(this,mxUtils.bind(this,function(N){this.spinner.stop();L(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(N))})))}else Y=aa+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(N){this.spinner.stop();L(N)}),m)}}catch(N){this.handleError(N)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,
+C,I,G,Z,ca,aa){var Y=this.editor.graph,qa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var Q="",X="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Z?X="&from="+Z.from+"&to="+Z.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
+this.currentPage){Q="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};I&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+Q+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ca&&isFinite(ca)?"&w="+ca:"")+(aa&&isFinite(aa)?"&h="+aa:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
-function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),aa()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),aa=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){aa();G()}));aa();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var V=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);V.addListener(mxEvent.CLICK,function(J,W){m.alert(ja.tooltip)});return V}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
-d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var aa=G.attributes,ca=0;ca<aa.length;ca++)q.setAttributeForCell(C,aa[ca].nodeName,0<aa[ca].nodeValue.length?aa[ca].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var ba=d.getAttribute("style");
-null!=ba&&q.model.setStyle(C,ba)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var Z=d.getAttribute("icon");if(null!=Z){var qa=0<Z.length?JSON.parse(Z):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var N=d.getAttribute("geometry");if(null!=N){N=JSON.parse(N);var Y=q.getCellGeometry(C);if(null!=Y){Y=Y.clone();for(key in N){var ea=parseFloat(N[key]);
-"dx"==key?Y.x+=ea:"dy"==key?Y.y+=ea:"dw"==key?Y.width+=ea:"dh"==key?Y.height+=ea:Y[key]=parseFloat(N[key])}q.model.setGeometry(C,Y)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
+function(aa){ca===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),Z()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),Z=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Z();G()}));Z();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ia){var V=new mxCellOverlay(ia.image||q.warningImage,ia.tooltip,ia.align,ia.valign,ia.offset);V.addListener(mxEvent.CLICK,function(L,ea){m.alert(ia.tooltip)});return V}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
+d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var Z=G.attributes,ca=0;ca<Z.length;ca++)q.setAttributeForCell(C,Z[ca].nodeName,0<Z[ca].nodeValue.length?Z[ca].nodeValue:null)}}catch(ia){null!=window.console&&console.log("Error in value for "+C.id+": "+ia)}try{var aa=d.getAttribute("style");
+null!=aa&&q.model.setStyle(C,aa)}catch(ia){null!=window.console&&console.log("Error in style for "+C.id+": "+ia)}try{var Y=d.getAttribute("icon");if(null!=Y){var qa=0<Y.length?JSON.parse(Y):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ia){null!=window.console&&console.log("Error in icon for "+C.id+": "+ia)}try{var Q=d.getAttribute("geometry");if(null!=Q){Q=JSON.parse(Q);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in Q){var fa=parseFloat(Q[key]);
+"dx"==key?X.x+=fa:"dy"==key?X.y+=fa:"dw"==key?X.width+=fa:"dh"==key?X.height+=fa:X[key]=parseFloat(Q[key])}q.model.setGeometry(C,X)}}}catch(ia){null!=window.console&&console.log("Error in icon for "+C.id+": "+ia)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
@@ -3426,64 +3428,64 @@ this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.back
this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
-var F=d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,aa,ca){return!ca||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ca&&"mxCell"==I.nodeName&&
-"previous"==G?null:aa:Math.round(aa)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
+var F=d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Z,ca){return!ca||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ca&&"mxCell"==I.nodeName&&
+"previous"==G?null:Z:Math.round(Z)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,y,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(ka,ja){0==ka.length&&d.isEditable()?
-(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(ka,ja)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(ka){F(f,ka)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
-null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var aa=document.createElement("img");aa.setAttribute("src",Editor.crossImage);aa.setAttribute("title",mxResources.get("close"));aa.setAttribute("valign","absmiddle");aa.setAttribute("border","0");aa.style.position=
-"relative";aa.style.top="2px";aa.style.width="14px";aa.style.cursor="pointer";aa.style.margin="0 3px";Editor.isDarkMode()&&(aa.style.filter="invert(100%)");var ca=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ca?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):
-ja();mxEvent.consume(ka)}}));if(d.isEditable()){var ba=this.editor.graph,Z=null,qa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),N=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Z&&null!=Z.parentNode&&Z.parentNode.removeChild(Z),Z=aa.cloneNode(!1),Z.setAttribute("src",Editor.spinImage),Z.setAttribute("title",mxResources.get("saving")),Z.style.cursor="default",Z.style.marginRight="2px",Z.style.marginTop="-2px",G.insertBefore(Z,
-G.firstChild),I.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Z&&null!=Z.parentNode&&(Z.parentNode.removeChild(Z),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ca&&(ca=aa.cloneNode(!1),ca.setAttribute("src",Editor.saveImage),ca.setAttribute("title",mxResources.get("save")),G.insertBefore(ca,G.firstChild),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
-LocalLibrary,!0,function(){null==ca||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ca.parentNode.removeChild(ca),ca=null)});mxEvent.consume(ja)})),I.style.paddingRight=18*G.childNodes.length+"px")}),Y=mxUtils.bind(this,function(ka,ja,V,J){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var W=0;W<ka.length;W++){var Q=ba.getCellGeometry(ka[W]);null!=Q&&Q.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,J||
-"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=J&&(ka.title=J);f.push(ka);N(V);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
-V=ba.view.getBounds(ja),J=ba.view.scale;V.x/=J;V.y/=J;V.width/=J;V.height/=J;V.x-=ba.view.translate.x;V.y-=ba.view.translate.y;Y(ja,V)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
-mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ea(ka),mxEvent.consume(ka))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility=
-"visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(ka){C.style.backgroundColor="#f1f3f4";ka.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(ka){C.style.cursor="";C.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,
-this.maxImageSize,mxUtils.bind(this,function(ja,V,J,W,Q,S,ha,la,u){if(null!=ja&&"image/"==V.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,Q,S),ja)],ja[0].vertex=!0,Y(ja,new mxRectangle(0,0,Q,S),ka,mxEvent.isAltDown(ka)?null:ha.substring(0,ha.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var H=!1,O=
-mxUtils.bind(this,function(T,R){null!=T&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(T),null!=R&&0<R.length&&(T=R));if(null!=T)if(T=mxUtils.parseXml(T),"mxlibrary"==T.documentElement.nodeName)try{var da=JSON.parse(mxUtils.getTextContent(T.documentElement));F(da,C);f=f.concat(da);N(ka);this.spinner.stop();H=!0}catch(xa){}else if("mxfile"==T.documentElement.nodeName)try{var P=T.documentElement.getElementsByTagName("diagram");for(da=0;da<P.length;da++){var ma=this.stringToCells(Editor.getDiagramNodeXml(P[da])),
-ra=this.editor.graph.getBoundingBoxFromGeometry(ma);Y(ma,new mxRectangle(0,0,ra.width,ra.height),ka)}H=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=u&&null!=ha&&(/(\.v(dx|sdx?))($|\?)/i.test(ha)||/(\.vs(x|sx?))($|\?)/i.test(ha))?this.importVisio(u,function(T){O(T,"text/xml")},null,ha):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(ja,ha)&&null!=u?this.isExternalDataComms()?this.parseFile(u,mxUtils.bind(this,function(T){4==T.readyState&&(this.spinner.stop(),200<=T.status&&299>=T.status?O(T.responseText,"text/xml"):this.handleError({message:mxResources.get(413==T.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(ja,V)}}));ka.stopPropagation();ka.preventDefault()})),
-mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,
-G.firstChild);mxEvent.addListener(m,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
-m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
-"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
-"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
-typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,m,q,y,F){d=new ImageDialog(this,d,f,g,m,q,y,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);
-this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=
-f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(Z){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),aa=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=
-I.retry&&(G=mxResources.get("cancel"),aa=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ca=null!=q?null:null!=y?y:window.location.hash;if(null!=ca&&("#G"==ca.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
-ca.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ca="#U"==ca.substring(0,2)?ca.substring(45,ca.lastIndexOf("%26ex")):ca.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ca);this.handleError(d,f,g,
-m,q)}),aa,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Z(){ea.innerText="";for(var ka=0;ka<qa.length;ka++){var ja=document.createElement("option");mxUtils.write(ja,qa[ka].displayName);ja.value=ka;ea.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[ka].email+">");ja.setAttribute("disabled","disabled");ea.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;
-ea.appendChild(ja)}var qa=this.drive.getUsersList(),N=document.createElement("div"),Y=document.createElement("span");Y.style.marginTop="6px";mxUtils.write(Y,mxResources.get("changeUser")+": ");N.appendChild(Y);var ea=document.createElement("select");ea.style.width="200px";Z();mxEvent.addListener(ea,"change",mxUtils.bind(this,function(){var ka=ea.value,ja=qa.length!=ka;ja&&this.drive.setUser(qa[ka]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(qa=this.drive.getUsersList(),Z())}),mxUtils.bind(this,
-function(V){this.handleError(V)}),!0)}));N.appendChild(ea);N=new CustomDialog(this,N,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(N.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?F=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?F=mxUtils.htmlEntities(I.response.error):
-"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):I.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var ba=y=null;null!=I&&null!=I.helpLink?(y=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+I.ownerEmail+
-")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,aa,null,null,y,ba,null,null,null,m?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,m,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/
-50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
-mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");
-F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!m){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var I=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(aa){mxEvent.consume(aa);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(aa){var ca=mxEvent.getSource(aa);ca!=F&&ca!=C?(null!=g&&g(),I(),mxEvent.consume(aa)):G()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,
-"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||
-/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,
-g,m);else{var F=document.createElement("a");y=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},
-2E4),F.click(),F.parentNode.removeChild(F)}catch(I){}}else this.createEchoRequest(d,f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),
-y=0;y<m;++y){for(var F=1024*y,C=Math.min(F+1024,g),I=Array(C-F),G=0;F<C;++G,++F)I[G]=d[F].charCodeAt(0);q[y]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,aa){try{if("_blank"==aa)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var ca=new EmbedDialog(this,d);this.showDialog(ca.container,450,240,!0,!0);ca.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else aa==App.MODE_DEVICE||"download"==aa?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(aa,mxUtils.bind(this,function(Z){try{this.exportFile(d,G,g,m,aa,Z)}catch(qa){this.handleError(qa)}}))}catch(Z){this.handleError(Z)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,y,F,null,1<q,I,d,g,m);y=this.isServices(q)?q>I?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||this.editor.graph.mathEnabled?(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+
-f+";base64,"+d+'"/></html>')):m.document.write("<html>"+d+"</html>"):m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var f=d(mxUtils.bind(this,function(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
-"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(ka,ia){0==ka.length&&d.isEditable()?
+(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ia.appendChild(y)):this.addLibraryEntries(ka,ia)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(ka){F(f,ka)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
+null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Z=document.createElement("img");Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));Z.setAttribute("valign","absmiddle");Z.setAttribute("border","0");Z.style.position="relative";
+Z.style.top="2px";Z.style.width="14px";Z.style.cursor="pointer";Z.style.margin="0 3px";Editor.isDarkMode()&&(Z.style.filter="invert(100%)");var ca=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ia=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ca?this.confirm(mxResources.get("allChangesLost"),null,ia,mxResources.get("cancel"),mxResources.get("discardChanges")):ia();mxEvent.consume(ka)}}));
+if(d.isEditable()){var aa=this.editor.graph,Y=null,qa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),Q=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=Z.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,G.firstChild),I.style.paddingRight=
+18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ca&&(ca=Z.cloneNode(!1),ca.setAttribute("src",Editor.saveImage),ca.setAttribute("title",mxResources.get("save")),G.insertBefore(ca,G.firstChild),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(ia){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+ca||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ca.parentNode.removeChild(ca),ca=null)});mxEvent.consume(ia)})),I.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ia,V,L){ka=aa.cloneCells(mxUtils.sortCells(aa.model.getTopmostCells(ka)));for(var ea=0;ea<ka.length;ea++){var O=aa.getCellGeometry(ka[ea]);null!=O&&O.translate(-ia.x,-ia.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ia.width,ia.height,L||"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),
+w:ia.width,h:ia.height};null!=L&&(ka.title=L);f.push(ka);Q(V);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),fa=mxUtils.bind(this,function(ka){if(aa.isSelectionEmpty())aa.getRubberband().isActive()?(aa.getRubberband().execute(ka),aa.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ia=aa.getSelectionCells(),V=aa.view.getBounds(ia),L=aa.view.scale;V.x/=L;V.y/=L;V.width/=L;V.height/=
+L;V.x-=aa.view.translate.x;V.y-=aa.view.translate.y;X(ia,V)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){aa.isMouseDown&&null!=aa.panningManager&&null!=aa.graphHandler.first&&(aa.graphHandler.suspend(),null!=aa.graphHandler.hint&&(aa.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",aa.panningManager.stop(),aa.autoScroll=!1,mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){aa.isMouseDown&&null!=
+aa.panningManager&&null!=aa.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,aa.panningManager.stop(),aa.graphHandler.reset(),aa.isMouseDown=!1,aa.autoScroll=!0,fa(ka),mxEvent.consume(ka))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(ka){aa.isMouseDown&&null!=aa.graphHandler.first&&(aa.graphHandler.resume(),null!=aa.graphHandler.hint&&(aa.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",aa.autoScroll=
+!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(ka){C.style.backgroundColor="#f1f3f4";ka.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(ka){C.style.cursor="";C.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ia,V,L,ea,O,N,ba,la,u){if(null!=
+ia&&"image/"==V.substring(0,6))ia="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ia),ia=[new mxCell("",new mxGeometry(0,0,O,N),ia)],ia[0].vertex=!0,X(ia,new mxRectangle(0,0,O,N),ka,mxEvent.isAltDown(ka)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var H=!1,P=mxUtils.bind(this,function(T,S){null!=T&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(T),
+null!=S&&0<S.length&&(T=S));if(null!=T)if(T=mxUtils.parseXml(T),"mxlibrary"==T.documentElement.nodeName)try{var da=JSON.parse(mxUtils.getTextContent(T.documentElement));F(da,C);f=f.concat(da);Q(ka);this.spinner.stop();H=!0}catch(xa){}else if("mxfile"==T.documentElement.nodeName)try{var R=T.documentElement.getElementsByTagName("diagram");for(da=0;da<R.length;da++){var ma=this.stringToCells(Editor.getDiagramNodeXml(R[da])),ra=this.editor.graph.getBoundingBoxFromGeometry(ma);X(ma,new mxRectangle(0,0,
+ra.width,ra.height),ka)}H=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=u&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(u,function(T){P(T,"text/xml")},null,ba):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ia,ba)&&null!=u?this.isExternalDataComms()?
+this.parseFile(u,mxUtils.bind(this,function(T){4==T.readyState&&(this.spinner.stop(),200<=T.status&&299>=T.status?P(T.responseText,"text/xml"):this.handleError({message:mxResources.get(413==T.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):P(ia,V)}}));ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor=
+"";ka.stopPropagation();ka.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));G.insertBefore(Z,G.firstChild);mxEvent.addListener(Z,"click",qa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&qa(ka)});m=Z.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,G.firstChild);mxEvent.addListener(m,"click",fa);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
+d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
+Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
+Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
+new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,m,q,y,F){d=new ImageDialog(this,d,f,g,m,q,y,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
+400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
+f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
+d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(Y){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(G=mxResources.get("cancel"),Z=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ca=null!=q?null:null!=y?y:window.location.hash;if(null!=ca&&("#G"==ca.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ca.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
+"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ca="#U"==ca.substring(0,2)?ca.substring(45,ca.lastIndexOf("%26ex")):ca.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ca);this.handleError(d,f,g,m,q)}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){fa.innerText=
+"";for(var ka=0;ka<qa.length;ka++){var ia=document.createElement("option");mxUtils.write(ia,qa[ka].displayName);ia.value=ka;fa.appendChild(ia);ia=document.createElement("option");ia.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ia,"<"+qa[ka].email+">");ia.setAttribute("disabled","disabled");fa.appendChild(ia)}ia=document.createElement("option");mxUtils.write(ia,mxResources.get("addAccount"));ia.value=qa.length;fa.appendChild(ia)}var qa=this.drive.getUsersList(),Q=document.createElement("div"),X=document.createElement("span");
+X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");Q.appendChild(X);var fa=document.createElement("select");fa.style.width="200px";Y();mxEvent.addListener(fa,"change",mxUtils.bind(this,function(){var ka=fa.value,ia=qa.length!=ka;ia&&this.drive.setUser(qa[ka]);this.drive.authorize(ia,mxUtils.bind(this,function(){ia||(qa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,function(V){this.handleError(V)}),!0)}));Q.appendChild(fa);Q=new CustomDialog(this,Q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
+!0)}));this.showDialog(Q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?F=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?F=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):I.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):
+"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var aa=y=null;null!=I&&null!=I.helpLink?(y=mxResources.get("help"),aa=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+I.ownerEmail+")"),aa=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Z,null,null,y,aa,null,null,null,m?g:null)}else null!=
+g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,m,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};
+EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?
+"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";
+if(!m){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var I=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,
+"click",mxUtils.bind(this,function(Z){mxEvent.consume(Z);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(Z){var ca=mxEvent.getSource(Z);ca!=F&&ca!=C?(null!=g&&g(),I(),mxEvent.consume(Z)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
+3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs",
+"dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&
+7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&
+navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,m);else{var F=document.createElement("a");y=(null==navigator.userAgent||
+0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(I){}}else this.createEchoRequest(d,
+f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),y=0;y<m;++y){for(var F=1024*y,C=Math.min(F+1024,g),I=Array(C-F),G=0;F<C;++G,++F)I[G]=
+d[F].charCodeAt(0);q[y]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Z){try{if("_blank"==Z)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var ca=new EmbedDialog(this,d);this.showDialog(ca.container,
+450,240,!0,!0);ca.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else Z==App.MODE_DEVICE||"download"==Z?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(Z,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,Z,Y)}catch(qa){this.handleError(qa)}}))}catch(Y){this.handleError(Y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
+!1,y,F,null,1<q,I,d,g,m);y=this.isServices(q)?q>I?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||this.editor.graph.mathEnabled?(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):m.document.write("<html>"+d+"</html>"):
+m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(m){null==
+this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow=
+"auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=
+this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
@@ -3492,313 +3494,311 @@ this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.styl
this.exportDialog.style.zIndex=y.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",I);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,aa){if("_blank"==aa||null!=G&&0<G.length){var ca=g("_blank"==aa?null:G,aa==App.MODE_DEVICE||"download"==aa||null==aa||"_blank"==aa?"0":"1");null!=ca&&(aa==App.MODE_DEVICE||"download"==aa||"_blank"==aa?ca.simulate(document,"_blank"):this.pickFolder(aa,mxUtils.bind(this,function(ba){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,aa,
-ba)}catch(Z){this.handleError(Z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ca.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ca.getStatus()&&299>=ca.getStatus())try{this.exportFile(ca.getText(),G,y,!0,aa,ba)}catch(Z){this.handleError(Z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Z){this.spinner.stop();this.handleError(Z)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
-!1,!1,F,null,1<C,I,m,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,I,G,aa,ca,ba,Z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();
-g=null!=g?g:qa;var N=f?null:this.editor.graph.background;N==mxConstants.NONE&&(N=null);null==N&&0==f&&(N=aa?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var Y=this.editor.graph.getSvg(N,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,aa,ca);m&&this.editor.graph.addSvgShadow(Y);var ea=this.getBaseFilename()+(q?".drawio":"")+".svg";Z=null!=Z?Z:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(ea,"svg",V,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var ka=mxUtils.bind(this,function(V){this.spinner.stop();q&&V.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));Z(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(Y);var ja=mxUtils.bind(this,function(V){y?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(V,ka,this.thumbImageCache)):ka(V)});ba?this.embedFonts(Y,ja):(this.editor.addFontCss(Y),ja(Y))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();
-I.id=F;null!=C&&I.setAttribute("name",C);g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");y&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=
-App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,
-"change",mxUtils.bind(this,function(){if("custom"==y.value){var F=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?
-"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
-"')");F.innerText="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q);
-q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(I){y=I;g()});
-mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("https://viewer.diagrams.net"==
-EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,m,q,y,F,C,
-I,G){I=this.createUrlParameters(d,f,g,m,q,y,I);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(I.push("open="+
-g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,I,G,aa,ca){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==m&&(ba.target=m);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||
-100==g||(ba.zoom=g/100);g=[];F&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=aa&&0<aa.length&&(ba.edit=aa);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ca(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,m){var q=document.createElement("div");
-q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name",
-"type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");F.appendChild(y);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(I);mxUtils.br(F);F.appendChild(C);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));F.appendChild(I);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor=
-"pointer",mxUtils.write(I,mxResources.get("share")),F.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var aa=this.addLinkSection(q),ca=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width=
-"60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Z=this.addCheckbox(q,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),N=this.addCheckbox(q,mxResources.get("layers"),!0),Y=this.addCheckbox(q,mxResources.get("tags"),!0),ea=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;F=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,ea);var ja=ka.getEditInput();
-ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,ca.checked,ba.value,aa.getTarget(),aa.getColor(),Z.checked,qa.checked,N.checked,Y.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
-this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var I=document.createElement("div");I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
-else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var ca=document.createElement("div");ca.style.whiteSpace="normal";mxUtils.write(ca,mxResources.get("linkAccountRequired"));G.appendChild(ca);ca=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
-ca.style.marginTop="12px";ca.className="geBtn";G.appendChild(ca);I.appendChild(G);ca=document.createElement("a");ca.style.paddingLeft="12px";ca.style.color="gray";ca.style.fontSize="11px";ca.style.cursor="pointer";mxUtils.write(ca,mxResources.get("check"));G.appendChild(ca);mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(J){this.spinner.stop();J=new ErrorDialog(this,
-null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.init()}))}))}var ba=null,Z=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",I.appendChild(ba),mxUtils.write(I,mxResources.get("height")+
-":"),Z=document.createElement("input"),Z.setAttribute("type","text"),Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginBottom="10px",Z.value=m+"px",I.appendChild(Z),mxUtils.br(I);var qa=this.addLinkSection(I,y);g=null!=this.pages&&1<this.pages.length;var N=null;if(null==aa||aa.constructor!=window.DriveFile||f)N=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var Y=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(I,Y),ka=ea.getEditInput();y&&(ka.style.marginLeft=
-Y.style.marginLeft,Y.style.display="none",d-=20);var ja=this.addCheckbox(I,mxResources.get("layers"),!0);ja.style.marginLeft=ka.style.marginLeft;ja.style.marginTop="8px";var V=this.addCheckbox(I,mxResources.get("tags"),!0);V.style.marginLeft=ka.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(Y,"change",function(){Y.checked?(ja.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));
-ka.checked&&Y.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==N?!0:N.checked,Y.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Z?Z.value:null,V.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
-!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";
-C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";y.appendChild(I);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),aa=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);F=this.editor.graph;var ca=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ca&&(ca.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Z=parseInt(I.value)||0;g(!G.checked,null!=aa?aa.checked:!1,null!=ca?ca.checked:!1,ba,Z)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(d,f,g,m,q,y,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var aa=this.editor.graph,ca="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Z=document.createElement("input");Z.setAttribute("type","text");Z.style.marginRight="16px";Z.style.width="60px";Z.style.marginLeft=
-"4px";Z.style.marginRight="12px";Z.value=this.lastExportZoom||"100%";G.appendChild(Z);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var N=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),Y=document.createElement("input");Y.style.marginTop="16px";Y.style.marginRight=
-"8px";Y.style.marginLeft="24px";Y.setAttribute("disabled","disabled");Y.setAttribute("type","checkbox");var ea=document.createElement("select");ea.style.marginTop="16px";ea.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(ba=0;ba<d.length;ba++)if(!aa.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[ba]));ja.setAttribute("value",d[ba]);ea.appendChild(ja);ka[d[ba]]=ja}I?(mxUtils.write(G,mxResources.get("size")+
-":"),G.appendChild(ea),mxUtils.br(G),ca+=26,mxEvent.addListener(ea,"change",function(){"selectionOnly"==ea.value&&(N.checked=!0)})):y&&(G.appendChild(Y),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ca+=30,mxEvent.addListener(N,"change",function(){N.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?I&&(N.style.display="none",N.nextSibling.style.display="none",N.nextSibling.nextSibling.style.display="none",ca-=30):(ea.value="diagram",Y.setAttribute("checked",
-"checked"),Y.defaultChecked=!0,mxEvent.addListener(N,"change",function(){ea.value=N.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(G,mxResources.get("dark"),!0),ca+=26);var W=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),Q=null;if("png"==C||"jpeg"==C)Q=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ca+=30;var S=
-this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);S.style.marginBottom="16px";var ha=document.createElement("input");ha.style.marginBottom="16px";ha.style.marginRight="8px";ha.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ha.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
-y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(ha.checked=!0,
-ha.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),W.checked=!1,W.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):"disabled"==ha.getAttribute("disabled")&&(ha.checked=!1,ha.removeAttribute("disabled"),W.removeAttribute("disabled"),ka.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(ha),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
-mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),ca+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ca+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=Z.value;q(Z.value,V.checked,!N.checked,W.checked,
-S.checked,ha.checked,qa.value,Y.checked,!1,u.value,null!=Q?Q.checked:null,null!=J?J.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,ca,!0,!0,null,null,null,null,!0);Z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=
-f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var I=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),aa=this.addCheckbox(y,g),ca=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,ca),Z=ba.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),N=this.addCheckbox(y,mxResources.get("layers"),qa,!qa);
-N.style.marginLeft=Z.style.marginLeft;N.style.marginBottom="12px";N.style.marginTop="8px";mxEvent.addListener(ca,"change",function(){ca.checked?(qa&&N.removeAttribute("disabled"),Z.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),Z.setAttribute("disabled","disabled"));Z.checked&&ca.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(I.checked,G.checked,aa.checked,
-ca.checked,ba.getLink(),N.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function I(Z){var qa=" ",N="";m&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=aa?"&page="+aa:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",N+="cursor:pointer;");d&&(N+="max-width:100%;");var Y="";g&&(Y=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Z+'"'+Y+(""!=N?' style="'+N+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),aa=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Z){var qa=m?this.getFileData(!0):null;
-Z=this.createImageDataUri(Z,qa,"png");I(Z)}),null,null,null,mxUtils.bind(this,function(Z){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ca="";g&&(ca="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+ca+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=
-ba.getStatus()&&299>=ba.getStatus()?I("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var aa=I[G].getAttribute("href");null!=aa&&"#"==aa.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&
-C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var ca=" ",ba="";m&&(ca="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":
-"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Z){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Z))+'"'+(""!=ba?' style="'+ba+'"':"")+ca+"/>")}))}else ba="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Z){if("_blank"==Z||null!=G&&0<G.length){var ca=g("_blank"==Z?null:G,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ca&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ca.simulate(document,"_blank"):this.pickFolder(Z,mxUtils.bind(this,function(aa){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,Z,aa)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&ca.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ca.getStatus()&&299>=ca.getStatus())try{this.exportFile(ca.getText(),G,y,!0,Z,aa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,m,y,q);C=this.isServices(C)?4<C?390:280:160;
+this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var Q=f?null:this.editor.graph.background;
+Q==mxConstants.NONE&&(Q=null);null==Q&&0==f&&(Q=Z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(Q,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!aa,Z,ca);m&&this.editor.graph.addSvgShadow(X);var fa=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var ka=mxUtils.bind(this,function(V){this.spinner.stop();q&&V.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(X);var ia=mxUtils.bind(this,function(V){y?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(V,
+ka,this.thumbImageCache)):ka(V)});aa?this.embedFonts(X,ia):(this.editor.addFontCss(X),ia(X))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&
+(I.setAttribute("checked","checked"),I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");y&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(q=window.location.href);
+var y=document.createElement("select");y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,"change",mxUtils.bind(this,function(){if("custom"==
+y.value){var F=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},
+getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+
+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,
+mxResources.get("openInThisWindow"));m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var y="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(y||"none",function(I){y=I;g()});mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
+F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),
+"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,m,q,y,F,C,I,G){I=this.createUrlParameters(d,f,g,m,q,y,I);d=this.getCurrentFile();
+f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,I,G,Z,ca){this.getBasenames();var aa={};""!=q&&q!=mxConstants.NONE&&(aa.highlight=q);"auto"!==m&&(aa.target=m);G||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(aa.zoom=g/100);g=[];F&&(g.push("pages"),aa.resize=!0,null!=
+this.pages&&null!=this.currentPage&&(aa.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),aa.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),aa.toolbar=g.join(" "));null!=Z&&0<Z.length&&(aa.edit=Z);null!=d?aa.url=d:aa.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';d=null!=
+d?"&fetch="+encodeURIComponent(d):"";ca(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=document.createElement("h3");
+mxUtils.write(y,mxResources.get("html"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value",
+"copy");F.appendChild(y);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(I);mxUtils.br(F);F.appendChild(C);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));F.appendChild(I);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),F.appendChild(I),
+mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Z=this.addLinkSection(q),ca=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";
+aa.value="100%";q.appendChild(aa);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),Q=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),fa=this.addCheckbox(q,mxResources.get("lightbox"),!0),ka=null;F=380;if(EditorUi.enableHtmlEditOption){ka=this.addEditButton(q,fa);var ia=ka.getEditInput();ia.style.marginBottom="16px";F+=50;mxEvent.addListener(fa,
+"change",function(){fa.checked?ia.removeAttribute("disabled"):ia.setAttribute("disabled","disabled");ia.checked&&fa.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,ca.checked,aa.value,Z.getTarget(),Z.getColor(),Y.checked,qa.checked,Q.checked,X.checked,fa.checked,null!=ka?ka.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=
+function(d,f,g,m,q,y,F,C){var I=document.createElement("div");I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Z=this.getCurrentFile();d=0;if(null==Z||Z.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
+G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var ca=document.createElement("div");ca.style.whiteSpace="normal";mxUtils.write(ca,mxResources.get("linkAccountRequired"));G.appendChild(ca);ca=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Z.getId())}));ca.style.marginTop="12px";ca.className="geBtn";G.appendChild(ca);I.appendChild(G);ca=document.createElement("a");
+ca.style.paddingLeft="12px";ca.style.color="gray";ca.style.fontSize="11px";ca.style.cursor="pointer";mxUtils.write(ca,mxResources.get("check"));G.appendChild(ca);mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(L){this.spinner.stop();L=new ErrorDialog(this,null,mxResources.get(null!=L?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(L.container,
+300,80,!0,!1);L.init()}))}))}var aa=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),aa=document.createElement("input"),aa.setAttribute("type","text"),aa.style.marginRight="16px",aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginRight="16px",aa.style.marginBottom="10px",aa.value="100%",I.appendChild(aa),mxUtils.write(I,mxResources.get("height")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft=
+"6px",Y.style.marginBottom="10px",Y.value=m+"px",I.appendChild(Y),mxUtils.br(I);var qa=this.addLinkSection(I,y);g=null!=this.pages&&1<this.pages.length;var Q=null;if(null==Z||Z.constructor!=window.DriveFile||f)Q=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!y),fa=this.addEditButton(I,X),ka=fa.getEditInput();y&&(ka.style.marginLeft=X.style.marginLeft,X.style.display="none",d-=20);var ia=this.addCheckbox(I,mxResources.get("layers"),
+!0);ia.style.marginLeft=ka.style.marginLeft;ia.style.marginTop="8px";var V=this.addCheckbox(I,mxResources.get("tags"),!0);V.style.marginLeft=ka.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ia.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ia.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));ka.checked&&X.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled",
+"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==Q?!0:Q.checked,X.checked,fa.getLink(),ia.checked,null!=aa?aa.value:null,null!=Y?Y.value:null,V.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=aa?(aa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=
+document.createElement("div");y.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";
+y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";y.appendChild(I);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var ca=
+m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ca&&(ca.style.marginBottom="16px");d=new CustomDialog(this,y,mxUtils.bind(this,function(){var aa=parseInt(C.value)/100||1,Y=parseInt(I.value)||0;g(!G.checked,null!=Z?Z.checked:!1,null!=ca?ca.checked:!1,aa,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,m,q,y,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;
+var G=document.createElement("div");G.style.whiteSpace="nowrap";var Z=this.editor.graph,ca="jpeg"==C?220:300,aa=document.createElement("h3");mxUtils.write(aa,d);aa.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(aa);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||
+"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var Q=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight="8px";X.style.marginLeft="24px";X.setAttribute("disabled",
+"disabled");X.setAttribute("type","checkbox");var fa=document.createElement("select");fa.style.marginTop="16px";fa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(aa=0;aa<d.length;aa++)if(!Z.isSelectionEmpty()||"selectionOnly"!=d[aa]){var ia=document.createElement("option");mxUtils.write(ia,mxResources.get(d[aa]));ia.setAttribute("value",d[aa]);fa.appendChild(ia);ka[d[aa]]=ia}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(fa),mxUtils.br(G),ca+=26,mxEvent.addListener(fa,
+"change",function(){"selectionOnly"==fa.value&&(Q.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ca+=30,mxEvent.addListener(Q,"change",function(){Q.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?I&&(Q.style.display="none",Q.nextSibling.style.display="none",Q.nextSibling.nextSibling.style.display="none",ca-=30):(fa.value="diagram",X.setAttribute("checked","checked"),X.defaultChecked=!0,mxEvent.addListener(Q,
+"change",function(){fa.value=Q.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),L=null;Editor.isDarkMode()&&(L=this.addCheckbox(G,mxResources.get("dark"),!0),ca+=26);var ea=this.addCheckbox(G,mxResources.get("shadow"),Z.shadowVisible),O=null;if("png"==C||"jpeg"==C)O=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ca+=30;var N=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),
+F,null,null,"jpeg"!=C);N.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight="8px";ba.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");y.setAttribute("value","none");mxUtils.write(y,
+mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),ka.page.style.display=
+"none","page"==fa.value&&(fa.value="diagram"),ea.checked=!1,ea.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),ea.removeAttribute("disabled"),ka.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(ba),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),
+ca+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
+u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ca+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=Y.value;q(Y.value,V.checked,!Q.checked,ea.checked,N.checked,ba.checked,qa.value,X.checked,!1,u.value,null!=O?O.checked:null,null!=
+L?L.checked:null,fa.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,ca,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+y.appendChild(C)}var I=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),Z=this.addCheckbox(y,g),ca=this.addCheckbox(y,mxResources.get("lightbox"),!0),aa=this.addEditButton(y,ca),Y=aa.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),Q=this.addCheckbox(y,mxResources.get("layers"),qa,!qa);Q.style.marginLeft=Y.style.marginLeft;Q.style.marginBottom="12px";Q.style.marginTop="8px";mxEvent.addListener(ca,"change",function(){ca.checked?
+(qa&&Q.removeAttribute("disabled"),Y.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&ca.checked?aa.getEditSelect().removeAttribute("disabled"):aa.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(I.checked,G.checked,Z.checked,ca.checked,aa.getLink(),Q.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(d,f,g,m,q,y,F,C){function I(Y){var qa=" ",Q="";m&&(qa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Q+=
+"cursor:pointer;");d&&(Q+="max-width:100%;");var X="";g&&(X=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=Q?' style="'+Q+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var qa=m?this.getFileData(!0):null;Y=this.createImageDataUri(Y,qa,"png");I(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({message:mxResources.get("unknownError")})}),
+null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ca="";g&&(ca="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var aa=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+ca+"&xml="+encodeURIComponent(f));aa.send(mxUtils.bind(this,function(){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Z=I[G].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var ca=" ",aa="";m&&(ca="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",aa+="cursor:pointer;");d&&(aa+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=aa?' style="'+aa+'"':"")+ca+"/>")}))}else aa="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),aa+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),aa+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=aa&&C.setAttribute("style",aa),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
d.nodeName)g=d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(aa){return"page"==aa?G.getName():"pagenumber"==aa?1:I.apply(this,
-arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(aa){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=aa.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(C));d(ca.substring(ca.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(ba){null!=f&&f(ba)}}),null,null,null,mxUtils.bind(this,function(aa){null!=
-f&&f(aa)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(aa){null!=f&&f(aa)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,I,G,aa,ca,ba){C=null!=C?C:!0;aa=null!=aa?aa:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,aa,null,null,y,null,null,null,f.shadowVisible||ca,null,ba,"diagram");(f.shadowVisible||ca)&&f.addSvgShadow(y,null,null,0==aa);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Z=mxUtils.bind(this,
-function(qa){qa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(N){Z(N)})):Z(qa)}));else return Z(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,I,G,aa,ca,ba){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Z=this.editor.graph.isSelectionEmpty();g=null!=g?g:Z;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,aa)}catch(N){this.handleError(N)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,F,G,ca,ba)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var aa=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=aa&&"mxfile"==aa.nodeName&&null!=this.pages){var ca=aa.getElementsByTagName("diagram");if(1==ca.length&&!y){if(aa=Editor.parseDiagramNode(ca[0]),null!=this.currentPage&&(d[ca[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ba=ca[0].getAttribute("name");null!=ba&&""!=ba&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,ba))}}else if(0<ca.length){y=[];var Z=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ca[0].getAttribute("id")]=this.pages[0].getId(),aa=Editor.parseDiagramNode(ca[0]),m=!1,Z=1);for(;Z<ca.length;Z++){var qa=ca[Z].getAttribute("id");ca[Z].removeAttribute("id");var N=this.updatePageRoot(new DiagramPage(ca[Z]));d[qa]=ca[Z].getAttribute("id");var Y=this.pages.length;null==N.getName()&&N.setName(mxResources.get("pageWithNumber",[Y+1]));I.model.execute(new ChangePage(this,
-N,N,Y,!0));y.push(N)}this.updatePageLinks(d,y)}}if(null!=aa&&"mxGraphModel"===aa.nodeName){C=I.importGraphModel(aa,f,g,m);if(null!=C)for(Z=0;Z<C.length;Z++)this.updatePageLinksForCell(d,C[Z]);var ea=I.parseBackgroundImage(aa.getAttribute("backgroundImage"));if(null!=ea&&null!=ea.originalSrc){this.updateBackgroundPageLink(d,ea);var ka=new ChangePageSetup(this,null,ea);ka.ignoreColor=!0;I.model.execute(ka)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ja){if(q)throw ja;
-this.handleError(ja)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(Z){return"page"==Z?G.getName():"pagenumber"==Z?1:I.apply(this,
+arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Z){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=Z.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(C));d(ca.substring(ca.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(aa){null!=f&&f(aa)}}),null,null,null,mxUtils.bind(this,function(Z){null!=
+f&&f(Z)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(Z){null!=f&&f(Z)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){C=null!=C?C:!0;Z=null!=Z?Z:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,Z,null,null,y,null,null,null,f.shadowVisible||ca,null,aa,"diagram");(f.shadowVisible||ca)&&f.addSvgShadow(y,null,null,0==Z);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(qa){qa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(Q){Y(Q)})):Y(qa)}));else return Y(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
+q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Z)}catch(Q){this.handleError(Q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,F,G,ca,aa)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
+[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Z=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ca=Z.getElementsByTagName("diagram");if(1==ca.length&&!y){if(Z=Editor.parseDiagramNode(ca[0]),null!=this.currentPage&&(d[ca[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var aa=ca[0].getAttribute("name");null!=aa&&""!=aa&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,aa))}}else if(0<ca.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ca[0].getAttribute("id")]=this.pages[0].getId(),Z=Editor.parseDiagramNode(ca[0]),m=!1,Y=1);for(;Y<ca.length;Y++){var qa=ca[Y].getAttribute("id");ca[Y].removeAttribute("id");var Q=this.updatePageRoot(new DiagramPage(ca[Y]));d[qa]=ca[Y].getAttribute("id");var X=this.pages.length;null==Q.getName()&&Q.setName(mxResources.get("pageWithNumber",[X+1]));I.model.execute(new ChangePage(this,
+Q,Q,X,!0));y.push(Q)}this.updatePageLinks(d,y)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){C=I.importGraphModel(Z,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var fa=I.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(d,fa);var ka=new ChangePageSetup(this,null,fa);ka.ignoreColor=!0;I.model.execute(ka)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ia){if(q)throw ia;
+this.handleError(ia)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var y=m.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}return f};
EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",I=m.lastIndexOf(".");if(0<=I&&I<m.length)C=m.substring(I+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
-G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(ca){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var aa=new XMLHttpRequest;aa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));aa.responseType="blob";this.addRemoteServiceSecurityCheck(aa);
-null!=q&&aa.setRequestHeader("x-convert-custom",q);aa.onreadystatechange=mxUtils.bind(this,function(){if(4==aa.readyState)if(200<=aa.status&&299>=aa.status)try{var ca=aa.response;if("text/xml"==ca.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Z){try{f(Z.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(ca)}else this.doImportVisio(ca,f,g,m)}catch(Z){g(Z)}else try{""==aa.responseType||"text"==aa.responseType?g({message:aa.responseText}):(ba=
-new FileReader,ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(aa.response))}catch(Z){g({})}});aa.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(ca){g(ca)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,
-function(q){this.handleError(q)});var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var m=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);
-console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=
-F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var aa=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(aa[2]);G=parseFloat(aa[3])}catch(ca){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(ca){m(ca)}})}catch(F){m(F)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,I,G){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+
-C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==
-f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var aa=new Image;aa.onload=function(){try{var ca=aa.width,ba=aa.height;if(0==ca&&0==ba){var Z=I.result,qa=Z.indexOf(","),N=decodeURIComponent(escape(atob(Z.substring(qa+1)))),Y=mxUtils.parseXml(N).getElementsByTagName("svg");0<Y.length&&(ca=parseFloat(Y[0].getAttribute("width")),ba=parseFloat(Y[0].getAttribute("height")))}g(I.result,ca,ba)}catch(ea){m(ea)}};aa.src=I.result};I.onerror=function(G){m(G)}}else m(C)};
-F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(ba){4==ba.readyState&&200<=ba.status&&299>=ba.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ba.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=
-G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var aa=this.importXml(G,f,g,y,!0,C);if(0<aa.length)return aa}catch(ba){}this.loadImage(d,
-mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(N,Y,ea){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),Y,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(N)+";"))}),F,this.maxImageSize);else{var Z=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),qa=Math.round(ba.width*Z);ba=Math.round(ba.height*
-Z);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),qa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ba=null;I.getModel().beginUpdate();try{ba=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(ba),I.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{I.getModel().endUpdate()}I.setSelectionCell(ba)}))}else{d=
-Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,y,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));
-I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ca=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ca.width;q.geometry.height=ca.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=
-I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
-EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.getFileContent(this,F,C,I)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.deleteFile(this,F,C,I)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
-new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,I=!1;y.forEach(function(G,aa){G=
-aa.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,aa.async("string").then(function(ca){0==ca.indexOf("<mxfile ")?f(ca):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=aa))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status?f(aa.responseText):
-g())}),d.name):g()}):I||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,I,G,aa,ca){G=null!=G?G:!0;var ba=!1,Z=null,qa=mxUtils.bind(this,function(N){var Y=null;null!=N&&"<mxlibrary"==N.substring(0,10)?this.loadLibrary(new LocalLibrary(this,N,F)):Y=this.importXml(N,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null);null!=C&&
-C(Y)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Z=this.importXml(f,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Z=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,qa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(I,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(N){4==N.readyState&&(200<=N.status&&299>=N.status?qa(N.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,
-q,F)):0==d.indexOf("PK")&&null!=I?(ba=!0,this.importZipFile(I,qa,mxUtils.bind(this,function(){Z=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Z)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Z=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G,null,null!=ca?mxEvent.isControlDown(ca):null));ba||null==C||C(Z);return Z};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,I,G,aa,ca,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Z=null!=
-f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var N=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var Y=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>Y){N=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,V=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,u,H,O,T,R,da,P,ma){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
-la,da)),null):this.importFile(la,u,H,O,T,R,da,P,ma,Z,ca,ba)}catch(ra){return this.handleError(ra),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=d.length,W=J,Q=[],S=mxUtils.bind(this,function(la,u){Q[la]=u;if(0==--W){this.spinner.stop();if(null!=C)C(Q);else{var H=[];ja.getModel().beginUpdate();try{for(la=0;la<Q.length;la++){var O=Q[la]();null!=O&&(H=H.concat(O))}}finally{ja.getModel().endUpdate()}}y(H)}}),
-ha=0;ha<J;ha++)mxUtils.bind(this,function(la){var u=d[la];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(O){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var T=Graph.clipSvgDataUri(O.target.result),R=T.indexOf(",");R=decodeURIComponent(escape(atob(T.substring(R+1))));var da=mxUtils.parseXml(R);R=da.getElementsByTagName("svg");if(0<R.length){R=R[0];var P=ca?null:R.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&
-(P=unescape(window.atob?atob(P):Base64.decode(P,!0)));null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P));null==P||"<mxfile "!==P.substring(0,8)&&"<mxGraphModel "!==P.substring(0,14)?S(la,mxUtils.bind(this,function(){try{if(null!=da){var xa=da.getElementsByTagName("svg");if(0<xa.length){var ta=xa[0],Aa=ta.getAttribute("width"),Ca=ta.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ca=null!=Ca&&"%"!=Ca.charAt(Ca.length-1)?parseFloat(Ca):NaN;var Ba=ta.getAttribute("viewBox");
-if(null==Ba||0==Ba.length)ta.setAttribute("viewBox","0 0 "+Aa+" "+Ca);else if(isNaN(Aa)||isNaN(Ca)){var sa=Ba.split(" ");3<sa.length&&(Aa=parseFloat(sa[2]),Ca=parseFloat(sa[3]))}T=Editor.createSvgDataUri(mxUtils.getXml(ta));var Oa=Math.min(1,Math.min(m/Math.max(1,Aa)),m/Math.max(1,Ca)),Ta=q(T,u.type,f+la*V,g+la*V,Math.max(1,Math.round(Aa*Oa)),Math.max(1,Math.round(Ca*Oa)),u.name);if(isNaN(Aa)||isNaN(Ca)){var Sa=new Image;Sa.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Sa.width);Ca=Math.max(1,
-Sa.height);Ta[0].geometry.width=Aa;Ta[0].geometry.height=Ca;ta.setAttribute("viewBox","0 0 "+Aa+" "+Ca);T=Editor.createSvgDataUri(mxUtils.getXml(ta));var $a=T.indexOf(";");0<$a&&(T=T.substring(0,$a)+T.substring(T.indexOf(",",$a+1)));ja.setCellStyles("image",T,[Ta[0]])});Sa.src=Editor.createSvgDataUri(mxUtils.getXml(ta))}return Ta}}}catch($a){}return null})):S(la,mxUtils.bind(this,function(){return q(P,"text/xml",f+la*V,g+la*V,0,0,u.name)}))}else S(la,mxUtils.bind(this,function(){return null}))}else{R=
-!1;if("image/png"==u.type){var ma=ca?null:this.extractGraphModelFromPng(O.target.result);if(null!=ma&&0<ma.length){var ra=new Image;ra.src=O.target.result;S(la,mxUtils.bind(this,function(){return q(ma,"text/xml",f+la*V,g+la*V,ra.width,ra.height,u.name)}));R=!0}}R||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(O.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,O.target.result,mxUtils.bind(this,function(ta,Aa,Ca){S(la,mxUtils.bind(this,function(){if(null!=ta&&ta.length<G){var Ba=qa&&this.isResampleImageSize(u.size,aa)?Math.min(1,Math.min(m/Aa,m/Ca)):1;return q(ta,u.type,f+la*V,g+la*V,Math.round(Aa*Ba),Math.round(Ca*Ba),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,m,aa,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else T=
-O.target.result,q(T,u.type,f+la*V,g+la*V,240,160,u.name,function(xa){S(la,function(){return xa})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,f+la*V,g+la*V,240,160,u.name,function(O){S(la,function(){return O})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(ha)});if(N){N=[];for(ea=0;ea<d.length;ea++)N.push(d[ea]);d=N;this.confirmImageResize(function(ja){qa=ja;ka()},I)}else ka()};EditorUi.prototype.isBlankFile=
-function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,
-mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,
-f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
-f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),I=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=Math.max(C/q,I/q);if(1<G){var aa=Math.round(C/G),ca=Math.round(I/G),ba=document.createElement("canvas");ba.width=aa;ba.height=ca;ba.getContext("2d").drawImage(d,0,0,aa,ca);var Z=ba.toDataURL();if(Z.length<f.length){var qa=document.createElement("canvas");qa.width=aa;qa.height=ca;var N=qa.toDataURL();
-Z!==N&&(f=Z,C=aa,I=ca)}}}catch(Y){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
-urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());
-var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(Y){var ea=Y.getEvent();return null==Y.getState()&&!mxEvent.isMouseEvent(ea)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ea)&&(null==Y.getState()||mxEvent.isControlDown(ea)||mxEvent.isShiftDown(ea))});f.cellEditor.editPlantUmlData=function(Y,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("plantUml")+
-":",ja.data,function(V){null!=V&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(V,ja.format,function(J,W,Q){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(Y,"<pre>"+J+"</pre>"),f.updateCellSize(Y,!0);else{f.setCellStyles("image",d.convertDataUri(J),[Y]);var S=f.model.getGeometry(Y);null!=S&&(S=S.clone(),S.width=W,S.height=Q,f.cellsResized([Y],[S],!1))}f.setAttributeForCell(Y,"plantUmlData",JSON.stringify({data:V,format:ja.format}))}finally{f.getModel().endUpdate()}},
-function(J){d.handleError(J)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(Y,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(V){null!=V&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(V,ja.config,function(J,W,Q){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",J,[Y]);var S=f.model.getGeometry(Y);null!=S&&(S=S.clone(),S.width=
-Math.max(S.width,W),S.height=Math.max(S.height,Q),f.cellsResized([Y],[S],!1));f.setAttributeForCell(Y,"mermaidData",JSON.stringify({data:V,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(J){d.handleError(J)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(Y,ea){try{var ka=this.graph.getAttributeForCell(Y,"plantUmlData");if(null!=ka)this.editPlantUmlData(Y,ea,ka);else if(ka=this.graph.getAttributeForCell(Y,
-"mermaidData"),null!=ka)this.editMermaidData(Y,ea,ka);else{var ja=f.getCellStyle(Y);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(Y):g.apply(this,arguments)}}catch(V){d.handleError(V)}};f.getLinkTitle=function(Y){return d.getLinkTitle(Y)};f.customLinkClicked=function(Y){var ea=!1;try{d.handleCustomLink(Y),ea=!0}catch(ka){d.handleError(ka)}return ea};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(Y){var ea=m.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
-(ea={originalSrc:ea.src});return ea};var q=f.setBackgroundImage;f.setBackgroundImage=function(Y){null!=Y&&null!=Y.originalSrc&&(Y=d.createImageForPageLink(Y.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(Y,ea){Y=null!=f.backgroundImage?
-f.backgroundImage.originalSrc:null;if(null!=Y){var ka=Y.indexOf(",");if(0<ka)for(Y=Y.substring(ka+1),ea=ea.getProperty("patches"),ka=0;ka<ea.length;ka++)if(null!=ea[ka][EditorUi.DIFF_UPDATE]&&null!=ea[ka][EditorUi.DIFF_UPDATE][Y]||null!=ea[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ea[ka][EditorUi.DIFF_REMOVE],Y)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(Y,ea){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!ea)ka=
-{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,V=this.shapeForegroundColor,J=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=J;this.shapeForegroundColor=V;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
-this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(Y){Y=null!=Y?Y:"";"1"==urlParams.dev&&(Y+=(0<Y.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=
-f.addClickHandler;f.addClickHandler=function(Y,ea,ka){var ja=ea;ea=function(V,J){if(null==J){var W=mxEvent.getSource(V);"a"==W.nodeName.toLowerCase()&&(J=W.getAttribute("href"))}null!=J&&f.isCustomLink(J)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&f.customLinkClicked(J)&&mxEvent.consume(V);null!=ja&&ja(V,J)};I.call(this,Y,ea,ka)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;
-this.menus.addPopupMenuEditItems=function(Y,ea,ka){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(Y,"delete - cut copy copyAsImage - duplicate".split(" "),null,ka)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var aa=f.getExportVariables;f.getExportVariables=function(){var Y=aa.apply(this,arguments),ea=d.getCurrentFile();
-null!=ea&&(Y.filename=ea.getTitle());Y.pagecount=null!=d.pages?d.pages.length:1;Y.page=null!=d.currentPage?d.currentPage.getName():"";Y.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return Y};var ca=f.getGlobalVariable;f.getGlobalVariable=function(Y){var ea=d.getCurrentFile();return"filename"==Y&&null!=ea?ea.getTitle():"page"==Y&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==Y?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+
-1:1:"pagecount"==Y?null!=d.pages?d.pages.length:1:ca.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=function(Y,ea,ka){var ja=ea.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(ka)&&mxEvent.isPopupTrigger(ka))ba.apply(this,arguments);else{if(!f.isEnabled()||null!=Y&&f.isCellLocked(Y.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(ka)}};this.editor.getOrCreateFilename=function(){var Y=d.defaultFilename,ea=d.getCurrentFile();null!=
-ea&&(Y=null!=ea.getTitle()?ea.getTitle():Y);return Y};var Z=this.actions.get("print");Z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Z.visible=Z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),
-this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(Y){var ea=f.cellEditor.text2,ka=null;null!=ea&&(mxEvent.addListener(ea,"dragleave",function(ja){null!=ka&&(ka.parentNode.removeChild(ka),
-ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(J,W,Q,S,ha,la){f.insertImage(J,ha,la)},
-function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var W=0;W<J.length;W++)J[W]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var V=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(J){var W=Math.max(1,J.width);J=Math.max(1,J.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,W)),Q/Math.max(1,J));f.insertImage(decodeURIComponent(V),
-W*Q,J*Q)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Z=this.editor.graph.view,Z.setUnit(mxSettings.getUnit()),Z.addListener("unitChanged",
-function(Y,ea){mxSettings.setUnit(ea.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,Z.unit),this.refresh());if("1"==urlParams.styledev){Z=document.getElementById("geFooter");null!=Z&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top=
-"14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(Y,ea){0<this.editor.graph.getSelectionCount()?(Y=this.editor.graph.getSelectionCell(),
-Y=this.editor.graph.getModel().getStyle(Y),this.styleInput.value=Y||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(Y){return mxEvent.getSource(Y)==this.styleInput?!0:qa.apply(this,arguments)}}Z=document.getElementById("geInfo");null!=Z&&Z.parentNode.removeChild(Z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var N=null;mxEvent.addListener(f.container,"dragleave",
-function(Y){f.isEnabled()&&(null!=N&&(N.parentNode.removeChild(N),N=null),Y.stopPropagation(),Y.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(Y){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(Y){null!=N&&(N.parentNode.removeChild(N),N=null);if(f.isEnabled()){var ea=
-mxUtils.convertPoint(f.container,mxEvent.getClientX(Y),mxEvent.getClientY(Y)),ka=Y.dataTransfer.files,ja=f.view.translate,V=f.view.scale,J=ea.x/V-ja.x,W=ea.y/V-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(Y)||ea)?(!mxEvent.isShiftDown(Y)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
-!0)):(mxEvent.isAltDown(Y)&&(W=J=null),this.importFiles(ka,J,W,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(Y),null,null,mxEvent.isShiftDown(Y),Y));else{mxEvent.isAltDown(Y)&&(W=J=0);var Q=0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")?Y.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(Y,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,J,W,!0));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")){var S=Y.dataTransfer.getData("text/html");
-ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(S);var ha=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(S=ea[0].getAttribute("src"),null==S&&(S=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)||(ha=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?S=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(S=mxUtils.getTextContent(ka[0]))));var la=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(S,
-J,W,!0,ha,null,la,mxEvent.isControlDown(Y)))});ha&&null!=S&&S.length>this.resampleThreshold?this.confirmImageResize(function(H){la=H;u()},mxEvent.isControlDown(Y)):u()}else null!=Q&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(H){var O=Math.max(1,H.width);H=Math.max(1,H.height);var T=this.maxImageSize;T=Math.min(1,Math.min(T/Math.max(1,O)),T/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",J,W,O*T,H*T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-Q+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(Q,J,W,!0))})):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(Y.dataTransfer.getData("text/plain"),J,W,!0))}}Y.stopPropagation();Y.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,aa,ca,ba,Z){d.insertImage(I,ba,Z)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});
-else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
-"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
-f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),
-this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,
-!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
-function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=
-d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;
-Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop",
-"1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap",
-"4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==
-d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=
-mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
-mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
-mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
-this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
-d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=
-function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(ca){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
-C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(ca){var ba=this.editor.graph;ba.lastPasteXml==ca?ba.pasteCounter++:(ba.lastPasteXml=ca,ba.pasteCounter=0);var Z=ba.pasteCounter*ba.gridSize;ba.setSelectionCells(this.importXml(ca,Z,Z));ba.scrollCellToVisible(ba.getSelectionCell())}),mxUtils.bind(this,
-function(ca){this.handleError(ca)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(ca){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=I)}catch(ca){}try{if(null!=
-y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(ca){console.log("Miro import error:",ca)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(ca){}}else if(!g){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(ca){this.handleError(ca)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=
-0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),
-f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):
-(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,
-null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
-"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
-"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),
-m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,
-10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();
-y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&
-(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=
-0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),
-F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&
-(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
-d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var I=F[C];null!=I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;
-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(I,G){this.editor.modified&&"0"!=urlParams.modified?null!=
-urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==(window.opener||window.parent)){var G=I.data,aa=null,ca=mxUtils.bind(this,function(P){if(null!=P&&"function"===typeof P.charAt&&"<"!=P.charAt(0))try{Editor.isPngDataUrl(P)?P=Editor.extractGraphModelFromPng(P):"data:image/svg+xml;base64,"==
-P.substring(0,26)?P=atob(P.substring(26)):"data:image/svg+xml;utf8,"==P.substring(0,24)&&(P=P.substring(24)),null!=P&&("%"==P.charAt(0)?P=decodeURIComponent(P):"<"!=P.charAt(0)&&(P=Graph.decompress(P)))}catch(ma){}return P});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(P){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?
-mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Z=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(P){null!=P?F.postMessage(JSON.stringify({event:"prompt",value:P,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",
-message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Z.container,300,80,!0,!1);Z.init();return}if("draft"==G.action){var qa=ca(G.xml);this.spinner.stop();Z=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",
-message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Z.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{Z.init()}catch(P){F.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();
-var N=1==G.enableRecent,Y=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(P,ma,ra){P=P||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:ma,tempUrl:ra.url,libs:ra.libs,builtIn:null!=ra.info&&null!=ra.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
-ka?ka.id:null,N?mxUtils.bind(this,function(P,ma,ra){this.remoteInvoke("getRecentDiagrams",[ra],null,P,ma)}):null,Y?mxUtils.bind(this,function(P,ma,ra,xa){this.remoteInvoke("searchDiagrams",[P,xa],null,ma,ra)}):null,mxUtils.bind(this,function(P,ma,ra){this.remoteInvoke("getFileContent",[P.url],null,ma,ra)}),null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,
-!0,!1,null,!1,!0);return}Z=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(P,ma,ra,xa){P=P||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:ma,tempUrl:ra,libs:xa,builtIn:!0,message:G}),"*"):(d(P,I,P!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,N?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",
-[null],null,P,function(){P(null,"Network Error!")})}):null,Y?mxUtils.bind(this,function(P,ma){this.remoteInvoke("searchDiagrams",[P,null],null,ma,function(){ma(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,ma,ra){F.postMessage(JSON.stringify({event:"template",docUrl:P,info:ma,name:ra}),"*")}),null,null,ea?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==G.withoutType);this.showDialog(Z.container,620,460,!0,!1,mxUtils.bind(this,
-function(P){this.sidebar.hideTooltip();P&&this.actions.get("exit").funct()}));Z.init();return}if("textContent"==G.action){var V=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:V,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var J=
-null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,J):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):
-G.spin)){var W=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var Q=this.editor.graph,S=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var ma=this.createLoadMessage("export");ma.format=G.format;ma.message=G;ma.data=P;ma.xml=W;F.postMessage(JSON.stringify(ma),"*")}),ha=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==G.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(W)));Q!=this.editor.graph&&
-Q.container.parentNode.removeChild(Q.container);S(P)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var P=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var ma,ra=0;ra<this.pages.length;ra++)if(this.pages[ra].getId()==la){ma=this.updatePageRoot(this.pages[ra]);break}null==ma&&(ma=this.currentPage);Q.getGlobalVariable=
-function(Ca){return"page"==Ca?ma.getName():"pagenumber"==Ca?1:P.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(ma.root)}if(null!=G.layerIds){var xa=Q.model,ta=xa.getChildCells(xa.getRoot()),Aa={};for(ra=0;ra<G.layerIds.length;ra++)Aa[G.layerIds[ra]]=!0;for(ra=0;ra<ta.length;ra++)xa.setVisible(ta[ra],Aa[ta[ra].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ca){ha(Ca.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ha(null)}),
-null,null,G.scale,G.transparent,G.shadow,null,Q,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(W),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this,function(P){200<=P.getStatus()&&
-299>=P.getStatus()?S("data:image/png;base64,"+P.getText()):ha(null)}),mxUtils.bind(this,function(){ha(null)}))}}else u=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ma=this.getXmlFileData();P.xml=mxUtils.getXml(ma);P.data=this.getFileData(null,null,!0,null,null,null,ma);P.format=G.format}else if("html"==G.format)ma=this.editor.getGraphXml(),P.data=this.getHtml(ma,
-this.editor.graph),P.xml=mxUtils.getXml(ma),P.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;ma=null!=G.background?G.background:this.editor.graph.background;ma==mxConstants.NONE&&(ma=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var ra=mxUtils.bind(this,function(xa){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(xa);F.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||
-this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(P.xml,this.editor.graph,null,!0,ra,null,null,G.embedImages,ma,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),ma=this.editor.graph.getSvg(ma,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||
-G.shadow)&&this.editor.graph.addSvgShadow(ma),this.embedFonts(ma,mxUtils.bind(this,function(xa){G.embedImages||null==G.embedImages?this.editor.convertImages(xa,mxUtils.bind(this,function(ta){ra(mxUtils.getXml(ta))})):ra(mxUtils.getXml(xa))}));return}F.postMessage(JSON.stringify(P),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(u)},0):u()):u();return}if("load"==G.action){ba=G.toSketch;m=1==G.autosave;
-this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var H=Editor.sketchMode;this.doSetSketchMode(G.rough);H!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(H=Editor.darkMode,this.doSetDarkMode(G.dark),H!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));
-null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var O=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var P=this.editor.graph,ma=P.maxFitScale;P.maxFitScale=G.maxFitScale;P.fit(2*O);P.maxFitScale=ma;P.container.scrollTop-=2*O;P.container.scrollLeft-=2*O;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&
-this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(P){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var T=this.getCurrentFile();null!=T&&(qa=ca(G.xml),null!=qa&&""!=qa&&T.mergeFile(new LocalFile(this,qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(P){F.postMessage(JSON.stringify({event:"merge",
-message:G,error:P}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(P){this.handleError(P)}}var R=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
-da=mxUtils.bind(this,function(P,ma){g=!0;try{d(P,ma,null,ba)}catch(ra){this.handleError(ra)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=R();m&&null==f&&(f=mxUtils.bind(this,function(ra,xa){ra=R();ra==q||g||(xa=this.createLoadMessage("autosave"),xa.xml=ra,(window.opener||window.parent).postMessage(JSON.stringify(xa),"*"));q=ra}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",
-f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ma=this.createLoadMessage("load"),ma.xml=P,F.postMessage(JSON.stringify(ma),
-"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(ca="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(P){da(P,I)},mxUtils.bind(this,function(P){this.handleError(P)}),ca)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
-this.parseFileData(G,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&"<mxGraphModel"==P.responseText.substring(0,13)&&da(P.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(P){da(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ca(G),da(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(P){da(R(),
-I)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(I,G,aa){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:aa}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
-this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,
-m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",
-mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,
-"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
-(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=
-[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,aa=null,ca=null,ba=null,Z=null,qa=null,N=null,Y="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",V="auto",J="auto",W=!1,Q=null,S=null,ha=40,la=40,u=100,H=0,O=function(){null!=f?f(ua):(I.setSelectionCells(ua),I.scrollCellToVisible(I.getSelectionCell()))},T=I.getFreeInsertPoint(),R=T.x,da=T.y;T=da;var P=null,ma="auto";ka=null;for(var ra=[],xa=null,ta=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&
-"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var Ca=d.indexOf(":");if(0<Ca){var Ba=mxUtils.trim(d.substring(1,Ca)),sa=mxUtils.trim(d.substring(Ca+1));"label"==Ba?P=I.sanitizeHtml(sa):"labelname"==Ba&&0<sa.length&&"-"!=sa?Z=sa:"labels"==Ba&&0<sa.length&&"-"!=sa?N=JSON.parse(sa):"style"==Ba?aa=sa:"parentstyle"==Ba?Y=sa:"unknownStyle"==Ba&&"-"!=sa?qa=sa:"stylename"==Ba&&0<sa.length&&"-"!=sa?ba=sa:"styles"==Ba&&
-0<sa.length&&"-"!=sa?ca=JSON.parse(sa):"vars"==Ba&&0<sa.length&&"-"!=sa?G=JSON.parse(sa):"identity"==Ba&&0<sa.length&&"-"!=sa?ea=sa:"parent"==Ba&&0<sa.length&&"-"!=sa?ka=sa:"namespace"==Ba&&0<sa.length&&"-"!=sa?ja=sa:"width"==Ba?V=sa:"height"==Ba?J=sa:"collapsed"==Ba&&"-"!=sa?W="true"==sa:"left"==Ba&&0<sa.length?Q=sa:"top"==Ba&&0<sa.length?S=sa:"ignore"==Ba?ta=sa.split(","):"connect"==Ba?ra.push(JSON.parse(sa)):"link"==Ba?xa=sa:"padding"==Ba?H=parseFloat(sa):"edgespacing"==Ba?ha=parseFloat(sa):"nodespacing"==
-Ba?la=parseFloat(sa):"levelspacing"==Ba?u=parseFloat(sa):"layout"==Ba&&(ma=sa)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Oa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));Ca=d=null;Ba=[];for(sa=0;sa<Oa.length;sa++)ea==Oa[sa]&&(d=sa),ka==Oa[sa]&&(Ca=sa),Ba.push(mxUtils.trim(Oa[sa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==P&&(P="%"+Ba[0]+"%");if(null!=ra)for(var Ta=0;Ta<ra.length;Ta++)null==C[ra[Ta].to]&&(C[ra[Ta].to]={});ea=[];for(sa=
-Aa+1;sa<g.length;sa++){var Sa=this.editor.csvToArray(g[sa].replace(/\r$/,""));if(null==Sa){var $a=40<g[sa].length?g[sa].substring(0,40)+"...":g[sa];throw Error($a+" ("+sa+"):\n"+mxResources.get("containsValidationErrors"));}0<Sa.length&&ea.push(Sa)}I.model.beginUpdate();try{for(sa=0;sa<ea.length;sa++){Sa=ea[sa];var Ga=null,eb=null!=d?ja+Sa[d]:null;g=!1;null!=eb&&(Ga=I.model.getCell(eb),g=null==Ga||0<=mxUtils.indexOf(m,Ga));var bb=new mxCell(P,new mxGeometry(R,T,0,0),aa||"whiteSpace=wrap;html=1;");
-bb.collapsed=W;bb.vertex=!0;bb.id=eb;null==Ga||g||I.model.setCollapsed(Ga,W);for(var z=0;z<Sa.length;z++)I.setAttributeForCell(bb,Ba[z],Sa[z]),null==Ga||g||I.setAttributeForCell(Ga,Ba[z],Sa[z]);if(null!=Z&&null!=N){var L=N[bb.getAttribute(Z)];null!=L&&(I.labelChanged(bb,L),null==Ga||g||I.cellLabelChanged(Ga,L))}if(null!=ba&&null!=ca){var M=ca[bb.getAttribute(ba)];null!=M&&(bb.style=M)}I.setAttributeForCell(bb,"placeholders","1");bb.style=I.replacePlaceholders(bb,bb.style,G);null==Ga||g?I.fireEvent(new mxEventObject("cellsInserted",
-"cells",[bb])):(I.model.setStyle(Ga,bb.style),0>mxUtils.indexOf(y,Ga)&&y.push(Ga),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ga])));g=null!=Ga;Ga=bb;if(!g)for(Ta=0;Ta<ra.length;Ta++)C[ra[Ta].to][Ga.getAttribute(ra[Ta].to)]=Ga;null!=xa&&"link"!=xa&&(I.setLinkForCell(Ga,Ga.getAttribute(xa)),I.setAttributeForCell(Ga,xa,null));var U=this.editor.graph.getPreferredSizeForCell(Ga);ka=null!=Ca?I.model.getCell(ja+Sa[Ca]):null;if(Ga.vertex){$a=null!=ka?0:R;Aa=null!=ka?0:da;null!=Q&&null!=Ga.getAttribute(Q)&&
-(Ga.geometry.x=$a+parseFloat(Ga.getAttribute(Q)));null!=S&&null!=Ga.getAttribute(S)&&(Ga.geometry.y=Aa+parseFloat(Ga.getAttribute(S)));var X="@"==V.charAt(0)?Ga.getAttribute(V.substring(1)):null;Ga.geometry.width=null!=X&&"auto"!=X?parseFloat(Ga.getAttribute(V.substring(1))):"auto"==V||"auto"==X?U.width+H:parseFloat(V);var fa="@"==J.charAt(0)?Ga.getAttribute(J.substring(1)):null;Ga.geometry.height=null!=fa&&"auto"!=fa?parseFloat(fa):"auto"==J||"auto"==fa?U.height+H:parseFloat(J);T+=Ga.geometry.height+
-la}g?(null==F[eb]&&(F[eb]=[]),F[eb].push(Ga)):(m.push(Ga),null!=ka?(ka.style=I.replacePlaceholders(ka,Y,G),I.addCell(Ga,ka),q.push(ka)):y.push(I.addCell(Ga)))}for(sa=0;sa<q.length;sa++)X="@"==V.charAt(0)?q[sa].getAttribute(V.substring(1)):null,fa="@"==J.charAt(0)?q[sa].getAttribute(J.substring(1)):null,"auto"!=V&&"auto"!=X||"auto"!=J&&"auto"!=fa||I.updateGroupBounds([q[sa]],H,!0);var na=y.slice(),ua=y.slice();for(Ta=0;Ta<ra.length;Ta++){var pa=ra[Ta];for(sa=0;sa<m.length;sa++){Ga=m[sa];var za=mxUtils.bind(this,
-function(Ya,cb,fb){var qb=cb.getAttribute(fb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var ab=C[fb.to][qb[ub]];if(null==ab&&null!=qa){ab=new mxCell(qb[ub],new mxGeometry(R,da,0,0),qa);ab.style=I.replacePlaceholders(cb,ab.style,G);var db=this.editor.graph.getPreferredSizeForCell(ab);ab.geometry.width=db.width+H;ab.geometry.height=db.height+H;C[fb.to][qb[ub]]=ab;ab.vertex=!0;ab.id=qb[ub];y.push(I.addCell(ab))}if(null!=ab){db=fb.label;null!=fb.fromlabel&&(db=(cb.getAttribute(fb.fromlabel)||
-"")+(db||""));null!=fb.sourcelabel&&(db=I.replacePlaceholders(cb,fb.sourcelabel,G)+(db||""));null!=fb.tolabel&&(db=(db||"")+(ab.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(db=(db||"")+I.replacePlaceholders(ab,fb.targetlabel,G));var kb="target"==fb.placeholders==!fb.invert?ab:Ya;kb=null!=fb.style?I.replacePlaceholders(kb,fb.style,G):I.createCurrentEdgeStyle();db=I.insertEdge(null,null,db||"",fb.invert?ab:Ya,fb.invert?Ya:ab,kb);if(null!=fb.labels)for(kb=0;kb<fb.labels.length;kb++){var ib=
-fb.labels[kb],nb=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ib.placeholders&&(nb.value=I.replacePlaceholders("target"==ib.placeholders==!fb.invert?ab:Ya,nb.value,G));if(null!=ib.dx||null!=ib.dy)nb.geometry.offset=new mxPoint(null!=ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);db.insert(nb)}ua.push(db);mxUtils.remove(fb.invert?Ya:ab,na)}}}});za(Ga,Ga,pa);if(null!=F[Ga.id])for(z=0;z<F[Ga.id].length;z++)za(Ga,
-F[Ga.id][z],pa)}}if(null!=ta)for(sa=0;sa<m.length;sa++)for(Ga=m[sa],z=0;z<ta.length;z++)I.setAttributeForCell(Ga,mxUtils.trim(ta[z]),null);if(0<y.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=ha;Da.checkOverlap=!0;var Ma=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Ya=0;Ya<y.length;Ya++){var cb=I.getCellGeometry(y[Ya]);cb.x=Math.round(I.snap(cb.x));cb.y=Math.round(I.snap(cb.y));"auto"==V&&(cb.width=Math.round(I.snap(cb.width)));"auto"==J&&(cb.height=Math.round(I.snap(cb.height)))}};
-if("["==ma.charAt(0)){var La=O;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ma)),function(){Ma();La()});O=null}else if("circle"==ma){var Ua=new mxCircleLayout(I);Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var Ra=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Ya){return Ra.apply(this,arguments)||0>mxUtils.indexOf(y,Ya)};this.executeLayout(function(){Ua.execute(I.getDefaultParent());Ma()},!0,O);O=null}else if("horizontaltree"==ma||"verticaltree"==ma||"auto"==ma&&ua.length==2*y.length-
-1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==ma);Fa.levelDistance=la;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,O);O=null}else if("horizontalflow"==ma||"verticalflow"==ma||"auto"==ma&&1==na.length){I.view.validate();var va=new mxHierarchicalLayout(I,"horizontalflow"==ma?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);va.intraCellSpacing=la;va.parallelEdgeSpacing=ha;va.interRankCellSpacing=
-u;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(I.getDefaultParent(),ua);I.moveCells(ua,R,da)},!0,O);O=null}else if("orgchart"==ma){I.view.validate();var ya=new mxOrgChartLayout(I,2,u,la),Na=ya.isVertexIgnored;ya.isVertexIgnored=function(Ya){return Na.apply(this,arguments)||0>mxUtils.indexOf(y,Ya)};this.executeLayout(function(){ya.execute(I.getDefaultParent());Ma()},!0,O);O=null}else if("organic"==ma||"auto"==ma&&ua.length>y.length){I.view.validate();var Ja=new mxFastOrganicLayout(I);
-Ja.forceConstant=3*la;Ja.disableEdgeStyle=!1;Ja.resetEdges=!1;var Pa=Ja.isVertexIgnored;Ja.isVertexIgnored=function(Ya){return Pa.apply(this,arguments)||0>mxUtils.indexOf(y,Ya)};this.executeLayout(function(){Ja.execute(I.getDefaultParent());Ma()},!0,O);O=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=O&&O()}}catch(Ya){this.handleError(Ya)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",
-m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],
-f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;
-return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
-g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&
-d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
-function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);
-this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<
-g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):
-"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var I=d.editor.graph;
-if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=I.getGraphBounds(),ca=Math.floor(aa.width*q/I.view.scale),ba=Math.floor(aa.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ca*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Z={globalVars:I.getExportVariables()};
-C&&(Z.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(qa,N){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(N||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Z))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+ca+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",
-C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);
-return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';
-var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));y[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<G.length;aa++){var ca=G[aa];y[ca.id]&&
-(f[ca.id]=ca);var ba=this.addCheckbox(q,ca.title,y[ca.id]);(function(Z,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[Z.id]=Z:delete f[Z.id]})})(ca,ba)}},mxUtils.bind(this,function(G){q.innerText="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(ca){this.remoteInvoke("getFileContent",[ca.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,ca))}catch(Z){this.handleError(Z,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));
-for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
-EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):
-g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var ca={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?ca.error={errResp:aa}:null!=G&&(ca.resp=G);this.remoteWin.postMessage(JSON.stringify(ca),"*")});try{var m=d.funtionName,
-q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);g([I])}}else g(null,"Invalid Call: "+
-m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(C);var I=!0,G=!1,aa,ca=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Z=mxUtils.bind(this,function(){ca++;qa()}),qa=mxUtils.bind(this,function(){try{if(ca>=aa.length)ba();else{var Y=aa[ca];StorageFile.getFileContent(this,Y,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==Y&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[Y]}),"*"):Z()}),Z)}}catch(ea){console.log(ea)}}),N=mxUtils.bind(this,function(Y){try{this.setDatabaseItem(null,[{title:Y.title,size:Y.data.length,lastModified:Date.now(),type:Y.isLib?"L":"F"},{title:Y.title,data:Y.data}],Z,Z,["filesInfo","files"])}catch(ea){console.log(ea)}});F=mxUtils.bind(this,function(Y){try{if(Y.source==C.contentWindow){var ea={};try{ea=JSON.parse(Y.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(I?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],I=!1,qa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?N(ea.resp[0]):Z())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&
-f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||
-(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||
-"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=
-f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=
-function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=
-function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=
-function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=
-function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,I,G,aa,ca,ba,Z,qa,N){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,I,G,aa,ca,ba,Z,qa,N)};EditorUi.prototype.createImageUrlConverter=
-function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");
-return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==
-localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&
-"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=ca.getElementsByTagName("div"),V=0,J=0;J<ja.length;J++)"none"!=ja[J].style.display&&ja[J].parentNode==ca&&V++;ba.style.display=0==V?"block":"none"}function d(ja,V,J,W){function Q(){V.removeChild(la);V.removeChild(u);ha.style.display="block";S.style.display="block"}I={div:V,comment:ja,saveCallback:J,deleteOnCancel:W};var S=V.querySelector(".geCommentTxt"),ha=V.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
-la.className="geCommentEditTxtArea";la.style.minHeight=S.offsetHeight+"px";la.value=ja.content;V.insertBefore(la,S);var u=document.createElement("div");u.className="geCommentEditBtns";var H=mxUtils.button(mxResources.get("cancel"),function(){W?(V.parentNode.removeChild(V),E()):Q();I=null});H.className="geCommentEditBtn";u.appendChild(H);var O=mxUtils.button(mxResources.get("save"),function(){S.innerText="";ja.content=la.value;mxUtils.write(S,ja.content);Q();J(ja);I=null});mxEvent.addListener(la,"keydown",
-mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(O.click(),mxEvent.consume(T)):27==T.keyCode&&(H.click(),mxEvent.consume(T)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";u.appendChild(O);V.insertBefore(u,S);ha.style.display="none";S.style.display="none";la.focus()}function f(ja,V){V.innerText="";ja=new Date(ja.modifiedDate);var J=b.timeSince(ja);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(V,
-mxResources.get("timeAgo",[J],"{1} ago"));V.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var V=document.createElement("img");V.className="geCommentBusyImg";V.src=IMAGE_PATH+"/spin.gif";ja.appendChild(V);ja.busyImg=V}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,V,J,W,Q){function S(da,P,ma){var ra=document.createElement("li");ra.className="geCommentAction";
-var xa=document.createElement("a");xa.className="geCommentActionLnk";mxUtils.write(xa,da);ra.appendChild(xa);mxEvent.addListener(xa,"click",function(ta){P(ta,ja);ta.preventDefault();mxEvent.consume(ta)});R.appendChild(ra);ma&&(ra.style.display="none")}function ha(){function da(ra){P.push(ma);if(null!=ra.replies)for(var xa=0;xa<ra.replies.length;xa++)ma=ma.nextSibling,da(ra.replies[xa])}var P=[],ma=u;da(ja);return{pdiv:ma,replies:P}}function la(da,P,ma,ra,xa){function ta(){g(sa);ja.addReply(Ba,function(Oa){Ba.id=
-Oa;ja.replies.push(Ba);q(sa);ma&&ma()},function(Oa){Aa();m(sa);b.handleError(Oa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,xa)}function Aa(){d(Ba,sa,function(Oa){ta()},!0)}var Ca=ha().pdiv,Ba=b.newComment(da,b.getCurrentUser());Ba.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var sa=y(Ba,ja.replies,Ca,W+1);P?Aa():ta()}if(Q||!ja.isResolved){ba.style.display="none";var u=document.createElement("div");u.className="geCommentContainer";u.setAttribute("data-commentId",
-ja.id);u.style.marginLeft=20*W+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(u.style.backgroundColor="ghostWhite");var H=document.createElement("div");H.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=ja.user.pictureUrl||Editor.userImage;H.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";H.appendChild(O);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,ja.user.displayName||"");O.appendChild(T);
-T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ja.id);f(ja,T);O.appendChild(T);u.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,ja.content||"");u.appendChild(H);ja.isLocked&&(u.style.opacity="0.5");H=document.createElement("div");H.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";H.appendChild(R);F||ja.isLocked||0!=W&&!C||S(mxResources.get("reply"),function(){la("",
-!0)},ja.isResolved);O=b.getCurrentUser();null==O||O.id!=ja.user.id||F||ja.isLocked||(S(mxResources.get("edit"),function(){function da(){d(ja,u,function(){g(u);ja.editComment(ja.content,function(){q(u)},function(P){m(u);da();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}da()},ja.isResolved),S(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(u);ja.deleteComment(function(da){if(!0===da){da=u.querySelector(".geCommentTxt");
-da.innerText="";mxUtils.write(da,mxResources.get("msgDeleted"));var P=u.querySelectorAll(".geCommentAction");for(da=0;da<P.length;da++)P[da].parentNode.removeChild(P[da]);q(u);u.style.opacity="0.5"}else{P=ha(ja).replies;for(da=0;da<P.length;da++)ca.removeChild(P[da]);for(da=0;da<V.length;da++)if(V[da]==ja){V.splice(da,1);break}ba.style.display=0==ca.getElementsByTagName("div").length?"block":"none"}},function(da){m(u);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));F||ja.isLocked||0!=W||S(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(da){function P(){var ma=da.target;ma.innerText="";ja.isResolved=!ja.isResolved;mxUtils.write(ma,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=ja.isResolved?"none":"",xa=ha(ja).replies,ta=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",Aa=0;Aa<xa.length;Aa++){xa[Aa].style.backgroundColor=ta;for(var Ca=xa[Aa].querySelectorAll(".geCommentAction"),
-Ba=0;Ba<Ca.length;Ba++)Ca[Ba]!=ma.parentNode&&(Ca[Ba].style.display=ra);N||(xa[Aa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,P,!1,!0):la(mxResources.get("markedAsResolved"),!1,P,!0)});u.appendChild(H);null!=J?ca.insertBefore(u,J.nextSibling):ca.appendChild(u);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)H=ja.replies[J],H.isResolved=ja.isResolved,y(H,ja.replies,null,W+1,Q);null!=I&&(I.comment.id==ja.id?(Q=ja.content,ja.content=I.comment.content,d(ja,u,I.saveCallback,
-I.deleteOnCancel),ja.content=Q):null==I.comment.id&&I.comment.pCommentId==ja.id&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return u}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",ca=document.createElement("div");ca.className="geCommentsList";ca.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";ca.style.bottom=parseInt(aa)+7+"px";G.appendChild(ca);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Z=document.createElement("div");Z.className="geToolbarContainer geCommentsToolbar";Z.style.height=aa;Z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Z.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";aa=document.createElement("a");
-aa.className="geButton";if(!F){var qa=aa.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function V(){d(J,W,function(Q){g(W);b.addComment(Q,function(S){Q.id=S;Y.push(Q);q(W)},function(S){m(W);V();b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),W=y(J,Y,null,0);
-V();ja.preventDefault();mxEvent.consume(ja)});Z.appendChild(qa)}qa=aa.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var N=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ja){this.className=(N=!N)?"geButton geCheckedBtn":"geButton";ea();ja.preventDefault();mxEvent.consume(ja)});Z.appendChild(qa);b.commentsRefreshNeeded()&&(qa=aa.cloneNode(),
-qa.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ja){ea();ja.preventDefault();mxEvent.consume(ja)}),Z.appendChild(qa));b.commentsSaveNeeded()&&(aa=aa.cloneNode(),aa.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',aa.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&
-(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Z.appendChild(aa));G.appendChild(Z);var Y=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var ja=I.div.querySelector(".geCommentEditTxtArea"),V=I.div.querySelector(".geCommentEditBtns");I.comment.content=ja.value;ja.parentNode.removeChild(ja);V.parentNode.removeChild(V)}catch(J){b.handleError(J)}ca.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function W(Q){if(null!=Q){Q.sort(function(ha,la){return new Date(ha.modifiedDate)-new Date(la.modifiedDate)});for(var S=0;S<Q.length;S++)W(Q[S].replies)}}J.sort(function(Q,S){return new Date(Q.modifiedDate)-new Date(S.modifiedDate)});ca.innerText="";ca.appendChild(ba);ba.style.display="block";Y=J;for(J=0;J<Y.length;J++)W(Y[J].replies),
-y(Y[J],Y,null,0,N);null!=I&&null==I.comment.id&&null==I.comment.pCommentId&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(J){ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Z=mxUtils.bind(this,function(){function ja(S){var ha=J[S.id];if(null!=ha)for(f(S,ha),ha=0;null!=S.replies&&ha<S.replies.length;ha++)ja(S.replies[ha])}
-if(this.window.isVisible()){for(var V=ca.querySelectorAll(".geCommentDate"),J={},W=0;W<V.length;W++){var Q=V[W];J[Q.getAttribute("data-commentId")]=Q}for(W=0;W<Y.length;W++)ja(Y[W])}});setInterval(Z,6E4);this.refreshCommentsTime=Z;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,V){var J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));V=Math.max(0,Math.min(V,J-this.table.clientHeight-48));this.getX()==ja&&this.getY()==V||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
-this.window.getX(),V=this.window.getY();this.window.setLocation(ja,V)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
-g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
-t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
-y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(ca){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var Z=new XMLHttpRequest;Z.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Z.responseType="blob";this.addRemoteServiceSecurityCheck(Z);
+null!=q&&Z.setRequestHeader("x-convert-custom",q);Z.onreadystatechange=mxUtils.bind(this,function(){if(4==Z.readyState)if(200<=Z.status&&299>=Z.status)try{var ca=Z.response;if("text/xml"==ca.type){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ca)}else this.doImportVisio(ca,f,g,m)}catch(Y){g(Y)}else try{""==Z.responseType||"text"==Z.responseType?g({message:Z.responseText}):(aa=new FileReader,
+aa.onload=function(){g({message:JSON.parse(aa.result).Message})},aa.readAsText(Z.response))}catch(Y){g({})}});Z.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(ca){g(ca)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
+var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
+this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
+JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,
+f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");
+if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Z=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Z[2]);G=parseFloat(Z[3])}catch(ca){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(ca){m(ca)}})}catch(F){m(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,I,G){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var Z=new Image;Z.onload=
+function(){try{var ca=Z.width,aa=Z.height;if(0==ca&&0==aa){var Y=I.result,qa=Y.indexOf(","),Q=decodeURIComponent(escape(atob(Y.substring(qa+1)))),X=mxUtils.parseXml(Q).getElementsByTagName("svg");0<X.length&&(ca=parseFloat(X[0].getAttribute("width")),aa=parseFloat(X[0].getAttribute("height")))}g(I.result,ca,aa)}catch(fa){m(fa)}};Z.src=I.result};I.onerror=function(G){m(G)}}else m(C)};F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=
+null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
+" "),mxUtils.bind(this,function(aa){4==aa.readyState&&200<=aa.status&&299>=aa.status&&this.editor.graph.setSelectionCells(this.insertTextAt(aa.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
+null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Z=this.importXml(G,f,g,y,!0,C);if(0<Z.length)return Z}catch(aa){}this.loadImage(d,mxUtils.bind(this,function(aa){if("data:"==d.substring(0,5))this.resizeImage(aa,d,mxUtils.bind(this,function(Q,
+X,fa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),X,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Q)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/aa.width,this.maxImageSize/aa.height)),qa=Math.round(aa.width*Y);aa=Math.round(aa.height*Y);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),qa,aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var aa=null;I.getModel().beginUpdate();try{aa=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(aa),I.fireEvent(new mxEventObject("textInserted","cells",[aa]))}finally{I.getModel().endUpdate()}I.setSelectionCell(aa)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(aa){this.editor.graph.setSelectionCells(this.importXml(aa,f,g,y,null,C))}),mxUtils.bind(this,function(aa){this.handleError(aa)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ca=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ca.width;q.geometry.height=ca.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,
+"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.getFileContent(this,F,C,I)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.deleteFile(this,F,C,I)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),
+this.importVisio(F,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,I=!1;y.forEach(function(G,Z){G=Z.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Z.async("string").then(function(ca){0==ca.indexOf("<mxfile ")?f(ca):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Z))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
+m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):g())}),d.name):g()}):I||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,I,G,Z,ca){G=null!=
+G?G:!0;var aa=!1,Y=null,qa=mxUtils.bind(this,function(Q){var X=null;null!=Q&&"<mxlibrary"==Q.substring(0,10)?this.loadLibrary(new LocalLibrary(this,Q,F)):X=this.importXml(Q,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null);null!=C&&C(X)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Z?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,
+I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(aa=!0,this.importGraphML(d,qa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(aa=!0,this.importVisio(I,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(aa=!0,q=mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?qa(Q.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(aa=!0,this.importZipFile(I,qa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),
+g,m,!0,null,G,null,null!=ca?mxEvent.isControlDown(ca):null));aa||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var Q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=Z||this.resampleThreshold,fa=0;fa<d.length;fa++)if("image/svg"!==d[fa].type.substring(0,9)&&"image/"===d[fa].type.substring(0,6)&&d[fa].size>X){Q=!0;break}var ka=mxUtils.bind(this,
+function(){var ia=this.editor.graph,V=ia.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,u,H,P,T,S,da,R,ma){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,la,da)),null):this.importFile(la,u,H,P,T,S,da,R,ma,Y,ca,aa)}catch(ra){return this.handleError(ra),null}});y=null!=y?y:mxUtils.bind(this,function(la){ia.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=d.length,ea=L,O=[],N=mxUtils.bind(this,
+function(la,u){O[la]=u;if(0==--ea){this.spinner.stop();if(null!=C)C(O);else{var H=[];ia.getModel().beginUpdate();try{for(la=0;la<O.length;la++){var P=O[la]();null!=P&&(H=H.concat(P))}}finally{ia.getModel().endUpdate()}}y(H)}}),ba=0;ba<L;ba++)mxUtils.bind(this,function(la){var u=d[la];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(P){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var T=Graph.clipSvgDataUri(P.target.result),S=T.indexOf(",");
+S=decodeURIComponent(escape(atob(T.substring(S+1))));var da=mxUtils.parseXml(S);S=da.getElementsByTagName("svg");if(0<S.length){S=S[0];var R=ca?null:S.getAttribute("content");null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(R,!0)));null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R));null==R||"<mxfile "!==R.substring(0,8)&&"<mxGraphModel "!==R.substring(0,14)?N(la,mxUtils.bind(this,function(){try{if(null!=da){var xa=da.getElementsByTagName("svg");if(0<xa.length){var ta=
+xa[0],Aa=ta.getAttribute("width"),Ca=ta.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ca=null!=Ca&&"%"!=Ca.charAt(Ca.length-1)?parseFloat(Ca):NaN;var Ba=ta.getAttribute("viewBox");if(null==Ba||0==Ba.length)ta.setAttribute("viewBox","0 0 "+Aa+" "+Ca);else if(isNaN(Aa)||isNaN(Ca)){var sa=Ba.split(" ");3<sa.length&&(Aa=parseFloat(sa[2]),Ca=parseFloat(sa[3]))}T=Editor.createSvgDataUri(mxUtils.getXml(ta));var Pa=Math.min(1,Math.min(m/Math.max(1,Aa)),m/Math.max(1,Ca)),
+Ta=q(T,u.type,f+la*V,g+la*V,Math.max(1,Math.round(Aa*Pa)),Math.max(1,Math.round(Ca*Pa)),u.name);if(isNaN(Aa)||isNaN(Ca)){var Oa=new Image;Oa.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Oa.width);Ca=Math.max(1,Oa.height);Ta[0].geometry.width=Aa;Ta[0].geometry.height=Ca;ta.setAttribute("viewBox","0 0 "+Aa+" "+Ca);T=Editor.createSvgDataUri(mxUtils.getXml(ta));var Xa=T.indexOf(";");0<Xa&&(T=T.substring(0,Xa)+T.substring(T.indexOf(",",Xa+1)));ia.setCellStyles("image",T,[Ta[0]])});Oa.src=Editor.createSvgDataUri(mxUtils.getXml(ta))}return Ta}}}catch(Xa){}return null})):
+N(la,mxUtils.bind(this,function(){return q(R,"text/xml",f+la*V,g+la*V,0,0,u.name)}))}else N(la,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==u.type){var ma=ca?null:this.extractGraphModelFromPng(P.target.result);if(null!=ma&&0<ma.length){var ra=new Image;ra.src=P.target.result;N(la,mxUtils.bind(this,function(){return q(ma,"text/xml",f+la*V,g+la*V,ra.width,ra.height,u.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(P.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,P.target.result,mxUtils.bind(this,function(ta,Aa,Ca){N(la,mxUtils.bind(this,function(){if(null!=ta&&ta.length<G){var Ba=qa&&this.isResampleImageSize(u.size,Z)?Math.min(1,Math.min(m/Aa,m/Ca)):1;return q(ta,u.type,f+la*V,g+la*V,Math.round(Aa*Ba),Math.round(Ca*Ba),u.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),qa,m,Z,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else T=P.target.result,q(T,u.type,f+la*V,g+la*V,240,160,u.name,function(xa){N(la,function(){return xa})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,f+la*V,g+la*V,240,160,u.name,function(P){N(la,function(){return P})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(ba)});
+if(Q){Q=[];for(fa=0;fa<d.length;fa++)Q.push(d[fa]);d=Q;this.confirmImageResize(function(ia){qa=ia;ka()},I)}else ka()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
+!0,!0):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
+action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),I=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=Math.max(C/q,I/q);if(1<G){var Z=Math.round(C/G),ca=Math.round(I/G),aa=document.createElement("canvas");aa.width=Z;aa.height=ca;aa.getContext("2d").drawImage(d,0,0,Z,
+ca);var Y=aa.toDataURL();if(Y.length<f.length){var qa=document.createElement("canvas");qa.width=Z;qa.height=ca;var Q=qa.toDataURL();Y!==Q&&(f=Y,C=Z,I=ca)}}}catch(X){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};
+EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&
+(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var fa=X.getEvent();return null==X.getState()&&!mxEvent.isMouseEvent(fa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(fa)&&(null==X.getState()||mxEvent.isControlDown(fa)||mxEvent.isShiftDown(fa))});
+f.cellEditor.editPlantUmlData=function(X,fa,ka){var ia=JSON.parse(ka);fa=new TextareaDialog(d,mxResources.get("plantUml")+":",ia.data,function(V){null!=V&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(V,ia.format,function(L,ea,O){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ia.format)f.labelChanged(X,"<pre>"+L+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(L),[X]);var N=f.model.getGeometry(X);null!=N&&(N=N.clone(),
+N.width=ea,N.height=O,f.cellsResized([X],[N],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:V,format:ia.format}))}finally{f.getModel().endUpdate()}},function(L){d.handleError(L)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};f.cellEditor.editMermaidData=function(X,fa,ka){var ia=JSON.parse(ka);fa=new TextareaDialog(d,mxResources.get("mermaid")+":",ia.data,function(V){null!=V&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(V,
+ia.config,function(L,ea,O){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",L,[X]);var N=f.model.getGeometry(X);null!=N&&(N=N.clone(),N.width=Math.max(N.width,ea),N.height=Math.max(N.height,O),f.cellsResized([X],[N],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:V,config:ia.config},null,2))}finally{f.getModel().endUpdate()}},function(L){d.handleError(L)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};var g=f.cellEditor.startEditing;
+f.cellEditor.startEditing=function(X,fa){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,fa,ka);else if(ka=this.graph.getAttributeForCell(X,"mermaidData"),null!=ka)this.editMermaidData(X,fa,ka);else{var ia=f.getCellStyle(X);"1"==mxUtils.getValue(ia,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(V){d.handleError(V)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var fa=!1;try{d.handleCustomLink(X),
+fa=!0}catch(ka){d.handleError(ka)}return fa};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var fa=m.apply(this,arguments);null!=fa&&null!=fa.src&&Graph.isPageLink(fa.src)&&(fa={originalSrc:fa.src});return fa};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));
+this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(X,fa){X=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=X){var ka=X.indexOf(",");if(0<ka)for(X=X.substring(ka+1),fa=fa.getProperty("patches"),ka=0;ka<fa.length;ka++)if(null!=fa[ka][EditorUi.DIFF_UPDATE]&&null!=fa[ka][EditorUi.DIFF_UPDATE][X]||null!=fa[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(fa[ka][EditorUi.DIFF_REMOVE],
+X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,fa){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!fa)ka={src:ka.originalSrc};else if(fa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ia=this.stylesheet,V=this.shapeForegroundColor,L=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);
+this.shapeBackgroundColor=L;this.shapeForegroundColor=V;this.stylesheet=ia}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C=
+d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(X,fa,ka){var ia=fa;fa=function(V,L){if(null==L){var ea=mxEvent.getSource(V);"a"==ea.nodeName.toLowerCase()&&(L=ea.getAttribute("href"))}null!=L&&f.isCustomLink(L)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&f.customLinkClicked(L)&&mxEvent.consume(V);null!=ia&&ia(V,L)};I.call(this,
+X,fa,ka)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(X,fa,ka){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,ka)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?
+470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Z=f.getExportVariables;f.getExportVariables=function(){var X=Z.apply(this,arguments),fa=d.getCurrentFile();null!=fa&&(X.filename=fa.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;X.page=null!=d.currentPage?d.currentPage.getName():"";X.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return X};var ca=f.getGlobalVariable;f.getGlobalVariable=function(X){var fa=d.getCurrentFile();
+return"filename"==X&&null!=fa?fa.getTitle():"page"==X&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==X?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:ca.apply(this,arguments)};var aa=f.labelLinkClicked;f.labelLinkClicked=function(X,fa,ka){var ia=fa.getAttribute("href");if(null==ia||!f.isCustomLink(ia)||!mxEvent.isTouchEvent(ka)&&mxEvent.isPopupTrigger(ka))aa.apply(this,arguments);else{if(!f.isEnabled()||null!=
+X&&f.isCellLocked(X.cell))f.customLinkClicked(ia),f.getRubberband().reset();mxEvent.consume(ka)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,fa=d.getCurrentFile();null!=fa&&(X=null!=fa.getTitle()?fa.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),
+this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,
+24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var fa=f.cellEditor.text2,ka=null;null!=fa&&(mxEvent.addListener(fa,"dragleave",function(ia){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);ia.stopPropagation();ia.preventDefault()}),mxEvent.addListener(fa,"dragover",mxUtils.bind(this,function(ia){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(fa));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(fa,"drop",
+mxUtils.bind(this,function(ia){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ia.dataTransfer.files.length)this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,function(L,ea,O,N,ba,la){f.insertImage(L,ba,la)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var ea=0;ea<L.length;ea++)L[ea]()},mxEvent.isControlDown(ia));else if(0<=mxUtils.indexOf(ia.dataTransfer.types,"text/uri-list")){var V=ia.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?
+this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(L){var ea=Math.max(1,L.width);L=Math.max(1,L.height);var O=this.maxImageSize;O=Math.min(1,Math.min(O/Math.max(1,ea)),O/Math.max(1,L));f.insertImage(decodeURIComponent(V),ea*O,L*O)})):document.execCommand("insertHTML",!1,ia.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ia.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ia.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ia.dataTransfer.types,"text/plain")&&
+document.execCommand("insertHTML",!1,ia.dataTransfer.getData("text/plain"));ia.stopPropagation();ia.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",function(X,fa){mxSettings.setUnit(fa.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,
+Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),
+this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,fa){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?
+!0:qa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Q=null;mxEvent.addListener(f.container,"dragleave",function(X){f.isEnabled()&&(null!=Q&&(Q.parentNode.removeChild(Q),Q=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(f.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(f.isEnabled()){var fa=mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ia=f.view.translate,V=f.view.scale,L=fa.x/V-ia.x,ea=fa.y/V-ia.y;if(0<ka.length)fa=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,
+9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||fa)?(!mxEvent.isShiftDown(X)&&fa&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,!0)):(mxEvent.isAltDown(X)&&(ea=L=null),this.importFiles(ka,L,ea,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(ea=L=0);var O=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):
+null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,L,ea,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var N=X.dataTransfer.getData("text/html");ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(N);var ba=null;fa=ka.getElementsByTagName("img");null!=fa&&1==fa.length?(N=fa[0].getAttribute("src"),null==N&&(N=fa[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)||(ba=!0)):(fa=ka.getElementsByTagName("a"),
+null!=fa&&1==fa.length?N=fa[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(N=mxUtils.getTextContent(ka[0]))));var la=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(N,L,ea,!0,ba,null,la,mxEvent.isControlDown(X)))});ba&&null!=N&&N.length>this.resampleThreshold?this.confirmImageResize(function(H){la=H;u()},mxEvent.isControlDown(X)):u()}else null!=O&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,
+function(H){var P=Math.max(1,H.width);H=Math.max(1,H.height);var T=this.maxImageSize;T=Math.min(1,Math.min(T/Math.max(1,P)),T/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",L,ea,P*T,H*T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+O+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(O,L,ea,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),
+L,ea,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=
+g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Z,ca,aa,Y){d.insertImage(I,aa,Y)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
+"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
+"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=
+F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,
+"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=
+d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
+"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);
+f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,
+"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=
+function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");
+}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=
+mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
+this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,
+f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
+mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,
+F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,
+"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",
+!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=
+this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&
+q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=
+decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(ca){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,
+mxUtils.bind(this,function(ca){var aa=this.editor.graph;aa.lastPasteXml==ca?aa.pasteCounter++:(aa.lastPasteXml=ca,aa.pasteCounter=0);var Y=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ca,Y,Y));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,function(ca){this.handleError(ca)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+
+3))}catch(ca){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=I)}catch(ca){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(ca){console.log("Miro import error:",
+ca)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(ca){}}else if(!g){var Z=this.editor.graph;Z.lastPasteXml=null;Z.pasteCounter=0}}catch(ca){this.handleError(ca)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&
+!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),
+y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&
+299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;
+var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):
+document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),
+200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();
+this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
+d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var I=F[C];null!=
+I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
+pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
+null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(I,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
+(window.opener||window.parent)){var G=I.data,Z=null,ca=mxUtils.bind(this,function(R){if(null!=R&&"function"===typeof R.charAt&&"<"!=R.charAt(0))try{Editor.isPngDataUrl(R)?R=Editor.extractGraphModelFromPng(R):"data:image/svg+xml;base64,"==R.substring(0,26)?R=atob(R.substring(26)):"data:image/svg+xml;utf8,"==R.substring(0,24)&&(R=R.substring(24)),null!=R&&("%"==R.charAt(0)?R=decodeURIComponent(R):"<"!=R.charAt(0)&&(R=Graph.decompress(R)))}catch(ma){}return R});if("json"==urlParams.proto){var aa=!1;
+try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(R){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
+G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(R){null!=R?F.postMessage(JSON.stringify({event:"prompt",value:R,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var qa=ca(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",
+[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
+"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(R){R&&this.actions.get("exit").funct()}));try{Y.init()}catch(R){F.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var Q=1==G.enableRecent,X=1==G.enableSearch,fa=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ia=new TemplatesDialog(this,function(R,ma,ra){R=R||this.emptyDiagramXml;
+F.postMessage(JSON.stringify({event:"template",xml:R,blank:R==this.emptyDiagramXml,name:ma,tempUrl:ra.url,libs:ra.libs,builtIn:null!=ra.info&&null!=ra.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ka?ka.id:null,Q?mxUtils.bind(this,function(R,ma,ra){this.remoteInvoke("getRecentDiagrams",[ra],null,R,ma)}):null,X?mxUtils.bind(this,function(R,ma,ra,xa){this.remoteInvoke("searchDiagrams",[R,xa],null,ma,ra)}):null,mxUtils.bind(this,
+function(R,ma,ra){this.remoteInvoke("getFileContent",[R.url],null,ma,ra)}),null,fa?mxUtils.bind(this,function(R){this.remoteInvoke("getCustomTemplates",null,null,R,function(){R({},0)})}):null,!1,!1,!0,!0);this.showDialog(ia.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(R,ma,ra,xa){R=R||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:R,blank:R==this.emptyDiagramXml,
+name:ma,tempUrl:ra,libs:xa,builtIn:!0,message:G}),"*"):(d(R,I,R!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,Q?mxUtils.bind(this,function(R){this.remoteInvoke("getRecentDiagrams",[null],null,R,function(){R(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(R,ma){this.remoteInvoke("searchDiagrams",[R,null],null,ma,function(){ma(null,"Network Error!")})}):null,mxUtils.bind(this,function(R,ma,ra){F.postMessage(JSON.stringify({event:"template",
+docUrl:R,info:ma,name:ra}),"*")}),null,null,fa?mxUtils.bind(this,function(R){this.remoteInvoke("getCustomTemplates",null,null,R,function(){R({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(R){this.sidebar.hideTooltip();R&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var V=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:V,message:G}),"*");return}if("status"==G.action){null!=
+G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var L=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,L):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=
+G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ea=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var O=this.editor.graph,N=mxUtils.bind(this,function(R){this.editor.graph.setEnabled(!0);this.spinner.stop();var ma=this.createLoadMessage("export");ma.format=
+G.format;ma.message=G;ma.data=R;ma.xml=ea;F.postMessage(JSON.stringify(ma),"*")}),ba=mxUtils.bind(this,function(R){null==R&&(R=Editor.blankImage);"xmlpng"==G.format&&(R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(ea)));O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);N(R)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=
+la){var R=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());for(var ma,ra=0;ra<this.pages.length;ra++)if(this.pages[ra].getId()==la){ma=this.updatePageRoot(this.pages[ra]);break}null==ma&&(ma=this.currentPage);O.getGlobalVariable=function(Ca){return"page"==Ca?ma.getName():"pagenumber"==Ca?1:R.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(ma.root)}if(null!=G.layerIds){var xa=O.model,ta=xa.getChildCells(xa.getRoot()),Aa={};for(ra=0;ra<G.layerIds.length;ra++)Aa[G.layerIds[ra]]=
+!0;for(ra=0;ra<ta.length;ra++)xa.setVisible(ta[ra],Aa[ta[ra].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ca){ba(Ca.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ba(null)}),null,null,G.scale,G.transparent,G.shadow,null,O,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ea),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&
+0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ea))).send(mxUtils.bind(this,function(R){200<=R.getStatus()&&299>=R.getStatus()?N("data:image/png;base64,"+R.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else u=mxUtils.bind(this,function(){var R=this.createLoadMessage("export");R.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&
+1<this.pages.length)){var ma=this.getXmlFileData();R.xml=mxUtils.getXml(ma);R.data=this.getFileData(null,null,!0,null,null,null,ma);R.format=G.format}else if("html"==G.format)ma=this.editor.getGraphXml(),R.data=this.getHtml(ma,this.editor.graph),R.xml=mxUtils.getXml(ma),R.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;ma=null!=G.background?G.background:this.editor.graph.background;ma==mxConstants.NONE&&(ma=null);R.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);R.format=
+"svg";var ra=mxUtils.bind(this,function(xa){this.editor.graph.setEnabled(!0);this.spinner.stop();R.data=Editor.createSvgDataUri(xa);F.postMessage(JSON.stringify(R),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(R.xml,this.editor.graph,null,!0,ra,null,null,G.embedImages,ma,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,
+null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),ma=this.editor.graph.getSvg(ma,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(ma),this.embedFonts(ma,mxUtils.bind(this,function(xa){G.embedImages||null==G.embedImages?this.editor.convertImages(xa,mxUtils.bind(this,function(ta){ra(mxUtils.getXml(ta))})):ra(mxUtils.getXml(xa))}));return}F.postMessage(JSON.stringify(R),
+"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(u)},0):u()):u();return}if("load"==G.action){aa=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var H=
+Editor.sketchMode;this.doSetSketchMode(G.rough);H!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(H=Editor.darkMode,this.doSetDarkMode(G.dark),H!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var P=this.embedExportBorder;this.diagramContainer.style.border=
+"2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";Z=mxUtils.bind(this,function(){var R=this.editor.graph,ma=R.maxFitScale;R.maxFitScale=G.maxFitScale;R.fit(2*P);R.maxFitScale=ma;R.container.scrollTop-=2*P;R.container.scrollLeft-=2*P;this.fireEvent(new mxEventObject("editInlineStart",
+"data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(R){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:
+G.xml}else{if("merge"==G.action){var T=this.getCurrentFile();null!=T&&(qa=ca(G.xml),null!=qa&&""!=qa&&T.mergeFile(new LocalFile(this,qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(R){F.postMessage(JSON.stringify({event:"merge",message:G,error:R}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",
+data:JSON.stringify(G)}),"*");return}}catch(R){this.handleError(R)}}var S=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),da=mxUtils.bind(this,function(R,ma){g=!0;try{d(R,ma,null,aa)}catch(ra){this.handleError(ra)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=S();m&&null==f&&(f=mxUtils.bind(this,function(ra,xa){ra=S();ra==q||g||(xa=this.createLoadMessage("autosave"),xa.xml=
+ra,(window.opener||window.parent).postMessage(JSON.stringify(xa),"*"));q=ra}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",
+f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ma=this.createLoadMessage("load"),ma.xml=R,F.postMessage(JSON.stringify(ma),"*");null!=Z&&Z()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(ca="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(R){da(R,I)},mxUtils.bind(this,function(R){this.handleError(R)}),
+ca)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(R){4==R.readyState&&200<=R.status&&299>=R.status&&"<mxGraphModel"==R.responseText.substring(0,13)&&da(R.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(R){da(R)}),mxUtils.bind(this,
+function(R){this.handleError(R)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ca(G),da(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(R){da(S(),I)}),mxUtils.bind(this,function(R){this.handleError(R,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=
+function(I,G,Z){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Z}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";
+var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
+d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
+mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});
+"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,
+function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Z=null,ca=null,aa=null,Y=null,qa=null,Q=null,X="whiteSpace=wrap;html=1;",fa=null,ka=null,ia="",V="auto",L="auto",ea=!1,O=null,N=null,ba=40,la=40,u=100,H=0,P=function(){null!=f?f(ua):(I.setSelectionCells(ua),I.scrollCellToVisible(I.getSelectionCell()))},T=I.getFreeInsertPoint(),S=T.x,da=T.y;T=da;var R=null,ma="auto";ka=null;
+for(var ra=[],xa=null,ta=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var Ca=d.indexOf(":");if(0<Ca){var Ba=mxUtils.trim(d.substring(1,Ca)),sa=mxUtils.trim(d.substring(Ca+1));"label"==Ba?R=I.sanitizeHtml(sa):"labelname"==Ba&&0<sa.length&&"-"!=sa?Y=sa:"labels"==Ba&&0<sa.length&&"-"!=sa?Q=JSON.parse(sa):"style"==Ba?
+Z=sa:"parentstyle"==Ba?X=sa:"unknownStyle"==Ba&&"-"!=sa?qa=sa:"stylename"==Ba&&0<sa.length&&"-"!=sa?aa=sa:"styles"==Ba&&0<sa.length&&"-"!=sa?ca=JSON.parse(sa):"vars"==Ba&&0<sa.length&&"-"!=sa?G=JSON.parse(sa):"identity"==Ba&&0<sa.length&&"-"!=sa?fa=sa:"parent"==Ba&&0<sa.length&&"-"!=sa?ka=sa:"namespace"==Ba&&0<sa.length&&"-"!=sa?ia=sa:"width"==Ba?V=sa:"height"==Ba?L=sa:"collapsed"==Ba&&"-"!=sa?ea="true"==sa:"left"==Ba&&0<sa.length?O=sa:"top"==Ba&&0<sa.length?N=sa:"ignore"==Ba?ta=sa.split(","):"connect"==
+Ba?ra.push(JSON.parse(sa)):"link"==Ba?xa=sa:"padding"==Ba?H=parseFloat(sa):"edgespacing"==Ba?ba=parseFloat(sa):"nodespacing"==Ba?la=parseFloat(sa):"levelspacing"==Ba?u=parseFloat(sa):"layout"==Ba&&(ma=sa)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Pa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));Ca=d=null;Ba=[];for(sa=0;sa<Pa.length;sa++)fa==Pa[sa]&&(d=sa),ka==Pa[sa]&&(Ca=sa),Ba.push(mxUtils.trim(Pa[sa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
+""));null==R&&(R="%"+Ba[0]+"%");if(null!=ra)for(var Ta=0;Ta<ra.length;Ta++)null==C[ra[Ta].to]&&(C[ra[Ta].to]={});fa=[];for(sa=Aa+1;sa<g.length;sa++){var Oa=this.editor.csvToArray(g[sa].replace(/\r$/,""));if(null==Oa){var Xa=40<g[sa].length?g[sa].substring(0,40)+"...":g[sa];throw Error(Xa+" ("+sa+"):\n"+mxResources.get("containsValidationErrors"));}0<Oa.length&&fa.push(Oa)}I.model.beginUpdate();try{for(sa=0;sa<fa.length;sa++){Oa=fa[sa];var Ga=null,eb=null!=d?ia+Oa[d]:null;g=!1;null!=eb&&(Ga=I.model.getCell(eb),
+g=null==Ga||0<=mxUtils.indexOf(m,Ga));var bb=new mxCell(R,new mxGeometry(S,T,0,0),Z||"whiteSpace=wrap;html=1;");bb.collapsed=ea;bb.vertex=!0;bb.id=eb;null==Ga||g||I.model.setCollapsed(Ga,ea);for(var z=0;z<Oa.length;z++)I.setAttributeForCell(bb,Ba[z],Oa[z]),null==Ga||g||I.setAttributeForCell(Ga,Ba[z],Oa[z]);if(null!=Y&&null!=Q){var K=Q[bb.getAttribute(Y)];null!=K&&(I.labelChanged(bb,K),null==Ga||g||I.cellLabelChanged(Ga,K))}if(null!=aa&&null!=ca){var M=ca[bb.getAttribute(aa)];null!=M&&(bb.style=M)}I.setAttributeForCell(bb,
+"placeholders","1");bb.style=I.replacePlaceholders(bb,bb.style,G);null==Ga||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[bb])):(I.model.setStyle(Ga,bb.style),0>mxUtils.indexOf(y,Ga)&&y.push(Ga),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ga])));g=null!=Ga;Ga=bb;if(!g)for(Ta=0;Ta<ra.length;Ta++)C[ra[Ta].to][Ga.getAttribute(ra[Ta].to)]=Ga;null!=xa&&"link"!=xa&&(I.setLinkForCell(Ga,Ga.getAttribute(xa)),I.setAttributeForCell(Ga,xa,null));var U=this.editor.graph.getPreferredSizeForCell(Ga);
+ka=null!=Ca?I.model.getCell(ia+Oa[Ca]):null;if(Ga.vertex){Xa=null!=ka?0:S;Aa=null!=ka?0:da;null!=O&&null!=Ga.getAttribute(O)&&(Ga.geometry.x=Xa+parseFloat(Ga.getAttribute(O)));null!=N&&null!=Ga.getAttribute(N)&&(Ga.geometry.y=Aa+parseFloat(Ga.getAttribute(N)));var W="@"==V.charAt(0)?Ga.getAttribute(V.substring(1)):null;Ga.geometry.width=null!=W&&"auto"!=W?parseFloat(Ga.getAttribute(V.substring(1))):"auto"==V||"auto"==W?U.width+H:parseFloat(V);var ha="@"==L.charAt(0)?Ga.getAttribute(L.substring(1)):
+null;Ga.geometry.height=null!=ha&&"auto"!=ha?parseFloat(ha):"auto"==L||"auto"==ha?U.height+H:parseFloat(L);T+=Ga.geometry.height+la}g?(null==F[eb]&&(F[eb]=[]),F[eb].push(Ga)):(m.push(Ga),null!=ka?(ka.style=I.replacePlaceholders(ka,X,G),I.addCell(Ga,ka),q.push(ka)):y.push(I.addCell(Ga)))}for(sa=0;sa<q.length;sa++)W="@"==V.charAt(0)?q[sa].getAttribute(V.substring(1)):null,ha="@"==L.charAt(0)?q[sa].getAttribute(L.substring(1)):null,"auto"!=V&&"auto"!=W||"auto"!=L&&"auto"!=ha||I.updateGroupBounds([q[sa]],
+H,!0);var na=y.slice(),ua=y.slice();for(Ta=0;Ta<ra.length;Ta++){var pa=ra[Ta];for(sa=0;sa<m.length;sa++){Ga=m[sa];var za=mxUtils.bind(this,function(Za,cb,fb){var qb=cb.getAttribute(fb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var ab=C[fb.to][qb[ub]];if(null==ab&&null!=qa){ab=new mxCell(qb[ub],new mxGeometry(S,da,0,0),qa);ab.style=I.replacePlaceholders(cb,ab.style,G);var db=this.editor.graph.getPreferredSizeForCell(ab);ab.geometry.width=db.width+H;ab.geometry.height=
+db.height+H;C[fb.to][qb[ub]]=ab;ab.vertex=!0;ab.id=qb[ub];y.push(I.addCell(ab))}if(null!=ab){db=fb.label;null!=fb.fromlabel&&(db=(cb.getAttribute(fb.fromlabel)||"")+(db||""));null!=fb.sourcelabel&&(db=I.replacePlaceholders(cb,fb.sourcelabel,G)+(db||""));null!=fb.tolabel&&(db=(db||"")+(ab.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(db=(db||"")+I.replacePlaceholders(ab,fb.targetlabel,G));var kb="target"==fb.placeholders==!fb.invert?ab:Za;kb=null!=fb.style?I.replacePlaceholders(kb,fb.style,
+G):I.createCurrentEdgeStyle();db=I.insertEdge(null,null,db||"",fb.invert?ab:Za,fb.invert?Za:ab,kb);if(null!=fb.labels)for(kb=0;kb<fb.labels.length;kb++){var ib=fb.labels[kb],ob=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");ob.vertex=!0;ob.connectable=!1;ob.geometry.relative=!0;null!=ib.placeholders&&(ob.value=I.replacePlaceholders("target"==ib.placeholders==!fb.invert?ab:Za,ob.value,G));if(null!=ib.dx||null!=ib.dy)ob.geometry.offset=new mxPoint(null!=
+ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);db.insert(ob)}ua.push(db);mxUtils.remove(fb.invert?Za:ab,na)}}}});za(Ga,Ga,pa);if(null!=F[Ga.id])for(z=0;z<F[Ga.id].length;z++)za(Ga,F[Ga.id][z],pa)}}if(null!=ta)for(sa=0;sa<m.length;sa++)for(Ga=m[sa],z=0;z<ta.length;z++)I.setAttributeForCell(Ga,mxUtils.trim(ta[z]),null);if(0<y.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=ba;Da.checkOverlap=!0;var Ma=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Za=0;Za<y.length;Za++){var cb=I.getCellGeometry(y[Za]);
+cb.x=Math.round(I.snap(cb.x));cb.y=Math.round(I.snap(cb.y));"auto"==V&&(cb.width=Math.round(I.snap(cb.width)));"auto"==L&&(cb.height=Math.round(I.snap(cb.height)))}};if("["==ma.charAt(0)){var La=P;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ma)),function(){Ma();La()});P=null}else if("circle"==ma){var Ua=new mxCircleLayout(I);Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var Sa=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Za){return Sa.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};
+this.executeLayout(function(){Ua.execute(I.getDefaultParent());Ma()},!0,P);P=null}else if("horizontaltree"==ma||"verticaltree"==ma||"auto"==ma&&ua.length==2*y.length-1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==ma);Fa.levelDistance=la;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,P);P=null}else if("horizontalflow"==ma||"verticalflow"==ma||"auto"==ma&&1==na.length){I.view.validate();
+var va=new mxHierarchicalLayout(I,"horizontalflow"==ma?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);va.intraCellSpacing=la;va.parallelEdgeSpacing=ba;va.interRankCellSpacing=u;va.disableEdgeStyle=!1;this.executeLayout(function(){va.execute(I.getDefaultParent(),ua);I.moveCells(ua,S,da)},!0,P);P=null}else if("orgchart"==ma){I.view.validate();var ya=new mxOrgChartLayout(I,2,u,la),Na=ya.isVertexIgnored;ya.isVertexIgnored=function(Za){return Na.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};
+this.executeLayout(function(){ya.execute(I.getDefaultParent());Ma()},!0,P);P=null}else if("organic"==ma||"auto"==ma&&ua.length>y.length){I.view.validate();var Ja=new mxFastOrganicLayout(I);Ja.forceConstant=3*la;Ja.disableEdgeStyle=!1;Ja.resetEdges=!1;var Qa=Ja.isVertexIgnored;Ja.isVertexIgnored=function(Za){return Qa.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};this.executeLayout(function(){Ja.execute(I.getDefaultParent());Ma()},!0,P);P=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=
+P&&P()}}catch(Za){this.handleError(Za)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
+this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
+this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
+EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,
+f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);
+f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Z=I.getGraphBounds(),ca=Math.floor(Z.width*q/I.view.scale),aa=Math.floor(Z.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ca*aa<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=
+g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:I.getExportVariables()};C&&(Y.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(qa,Q){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(Q||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+ca+"&h="+aa+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||
+"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+
+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));y[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var Z=0;Z<G.length;Z++){var ca=G[Z];y[ca.id]&&(f[ca.id]=ca);var aa=this.addCheckbox(q,ca.title,y[ca.id]);(function(Y,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(ca,aa)}},mxUtils.bind(this,function(G){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Z)}));
+g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Z;for(Z in f)null==y[Z]&&(G++,mxUtils.bind(this,function(ca){this.remoteInvoke("getFileContent",[ca.downloadUrl],null,mxUtils.bind(this,function(aa){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,aa,ca))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(f[Z]));for(Z in y)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,y[Z]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
+setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,
+arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Z){var ca={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=Z?ca.error={errResp:Z}:null!=G&&(ca.resp=G);this.remoteWin.postMessage(JSON.stringify(ca),
+"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);
+g([I])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display=
+"none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var I=!0,G=!1,Z,ca=0,aa=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){ca++;qa()}),qa=mxUtils.bind(this,function(){try{if(ca>=Z.length)aa();else{var X=Z[ca];StorageFile.getFileContent(this,X,mxUtils.bind(this,
+function(fa){null==fa||".scratchpad"==X&&fa==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(fa){console.log(fa)}}),Q=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(fa){console.log(fa)}});F=mxUtils.bind(this,function(X){try{if(X.source==
+C.contentWindow){var fa={};try{fa=JSON.parse(X.data)}catch(ka){}"init"==fa.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||G||(I?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(Z=fa.resp[0],I=!1,qa()):aa():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?Q(fa.resp[0]):Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",
+F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};
+EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=
+g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";
+var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
+EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
+return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
+DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y,qa,
+Q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y,qa,Q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,
+f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=
+function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,
+5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ia=ca.getElementsByTagName("div"),V=0,L=0;L<ia.length;L++)"none"!=ia[L].style.display&&ia[L].parentNode==ca&&V++;aa.style.display=0==V?"block":"none"}function d(ia,V,L,ea){function O(){V.removeChild(la);V.removeChild(u);ba.style.display="block";N.style.display="block"}I={div:V,comment:ia,saveCallback:L,deleteOnCancel:ea};var N=V.querySelector(".geCommentTxt"),ba=V.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
+la.className="geCommentEditTxtArea";la.style.minHeight=N.offsetHeight+"px";la.value=ia.content;V.insertBefore(la,N);var u=document.createElement("div");u.className="geCommentEditBtns";var H=mxUtils.button(mxResources.get("cancel"),function(){ea?(V.parentNode.removeChild(V),E()):O();I=null});H.className="geCommentEditBtn";u.appendChild(H);var P=mxUtils.button(mxResources.get("save"),function(){N.innerText="";ia.content=la.value;mxUtils.write(N,ia.content);O();L(ia);I=null});mxEvent.addListener(la,
+"keydown",mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(H.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";u.appendChild(P);V.insertBefore(u,N);ba.style.display="none";N.style.display="none";la.focus()}function f(ia,V){V.innerText="";ia=new Date(ia.modifiedDate);var L=b.timeSince(ia);null==L&&(L=mxResources.get("lessThanAMinute"));
+mxUtils.write(V,mxResources.get("timeAgo",[L],"{1} ago"));V.setAttribute("title",ia.toLocaleDateString()+" "+ia.toLocaleTimeString())}function g(ia){var V=document.createElement("img");V.className="geCommentBusyImg";V.src=IMAGE_PATH+"/spin.gif";ia.appendChild(V);ia.busyImg=V}function m(ia){ia.style.border="1px solid red";ia.removeChild(ia.busyImg)}function q(ia){ia.style.border="";ia.removeChild(ia.busyImg)}function y(ia,V,L,ea,O){function N(da,R,ma){var ra=document.createElement("li");ra.className=
+"geCommentAction";var xa=document.createElement("a");xa.className="geCommentActionLnk";mxUtils.write(xa,da);ra.appendChild(xa);mxEvent.addListener(xa,"click",function(ta){R(ta,ia);ta.preventDefault();mxEvent.consume(ta)});S.appendChild(ra);ma&&(ra.style.display="none")}function ba(){function da(ra){R.push(ma);if(null!=ra.replies)for(var xa=0;xa<ra.replies.length;xa++)ma=ma.nextSibling,da(ra.replies[xa])}var R=[],ma=u;da(ia);return{pdiv:ma,replies:R}}function la(da,R,ma,ra,xa){function ta(){g(sa);
+ia.addReply(Ba,function(Pa){Ba.id=Pa;ia.replies.push(Ba);q(sa);ma&&ma()},function(Pa){Aa();m(sa);b.handleError(Pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,xa)}function Aa(){d(Ba,sa,function(Pa){ta()},!0)}var Ca=ba().pdiv,Ba=b.newComment(da,b.getCurrentUser());Ba.pCommentId=ia.id;null==ia.replies&&(ia.replies=[]);var sa=y(Ba,ia.replies,Ca,ea+1);R?Aa():ta()}if(O||!ia.isResolved){aa.style.display="none";var u=document.createElement("div");u.className="geCommentContainer";
+u.setAttribute("data-commentId",ia.id);u.style.marginLeft=20*ea+5+"px";ia.isResolved&&!Editor.isDarkMode()&&(u.style.backgroundColor="ghostWhite");var H=document.createElement("div");H.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=ia.user.pictureUrl||Editor.userImage;H.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";H.appendChild(P);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,
+ia.user.displayName||"");P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ia.id);f(ia,T);P.appendChild(T);u.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,ia.content||"");u.appendChild(H);ia.isLocked&&(u.style.opacity="0.5");H=document.createElement("div");H.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";H.appendChild(S);F||ia.isLocked||0!=ea&&
+!C||N(mxResources.get("reply"),function(){la("",!0)},ia.isResolved);P=b.getCurrentUser();null==P||P.id!=ia.user.id||F||ia.isLocked||(N(mxResources.get("edit"),function(){function da(){d(ia,u,function(){g(u);ia.editComment(ia.content,function(){q(u)},function(R){m(u);da();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}da()},ia.isResolved),N(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(u);ia.deleteComment(function(da){if(!0===
+da){da=u.querySelector(".geCommentTxt");da.innerText="";mxUtils.write(da,mxResources.get("msgDeleted"));var R=u.querySelectorAll(".geCommentAction");for(da=0;da<R.length;da++)R[da].parentNode.removeChild(R[da]);q(u);u.style.opacity="0.5"}else{R=ba(ia).replies;for(da=0;da<R.length;da++)ca.removeChild(R[da]);for(da=0;da<V.length;da++)if(V[da]==ia){V.splice(da,1);break}aa.style.display=0==ca.getElementsByTagName("div").length?"block":"none"}},function(da){m(u);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ia.isResolved));F||ia.isLocked||0!=ea||N(ia.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(da){function R(){var ma=da.target;ma.innerText="";ia.isResolved=!ia.isResolved;mxUtils.write(ma,ia.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=ia.isResolved?"none":"",xa=ba(ia).replies,ta=Editor.isDarkMode()?"transparent":ia.isResolved?"ghostWhite":"white",Aa=0;Aa<xa.length;Aa++){xa[Aa].style.backgroundColor=ta;for(var Ca=xa[Aa].querySelectorAll(".geCommentAction"),
+Ba=0;Ba<Ca.length;Ba++)Ca[Ba]!=ma.parentNode&&(Ca[Ba].style.display=ra);Q||(xa[Aa].style.display="none")}E()}ia.isResolved?la(mxResources.get("reOpened")+": ",!0,R,!1,!0):la(mxResources.get("markedAsResolved"),!1,R,!0)});u.appendChild(H);null!=L?ca.insertBefore(u,L.nextSibling):ca.appendChild(u);for(L=0;null!=ia.replies&&L<ia.replies.length;L++)H=ia.replies[L],H.isResolved=ia.isResolved,y(H,ia.replies,null,ea+1,O);null!=I&&(I.comment.id==ia.id?(O=ia.content,ia.content=I.comment.content,d(ia,u,I.saveCallback,
+I.deleteOnCancel),ia.content=O):null==I.comment.id&&I.comment.pCommentId==ia.id&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return u}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Z=EditorUi.compactUi?"26px":"30px",ca=document.createElement("div");ca.className="geCommentsList";ca.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
+"whiteSmoke";ca.style.bottom=parseInt(Z)+7+"px";G.appendChild(ca);var aa=document.createElement("span");aa.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(aa,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=Z;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Z=document.createElement("a");Z.className=
+"geButton";if(!F){var qa=Z.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ia){function V(){d(L,ea,function(O){g(ea);b.addComment(O,function(N){O.id=N;X.push(O);q(ea)},function(N){m(ea);V();b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var L=b.newComment("",b.getCurrentUser()),ea=y(L,X,null,0);V();ia.preventDefault();
+mxEvent.consume(ia)});Y.appendChild(qa)}qa=Z.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var Q=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ia){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";fa();ia.preventDefault();mxEvent.consume(ia)});Y.appendChild(qa);b.commentsRefreshNeeded()&&(qa=Z.cloneNode(),qa.innerHTML='<img src="'+
+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ia){fa();ia.preventDefault();mxEvent.consume(ia)}),Y.appendChild(qa));b.commentsSaveNeeded()&&(Z=Z.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',Z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(Z.style.filter="invert(100%)"),
+mxEvent.addListener(Z,"click",function(ia){t();ia.preventDefault();mxEvent.consume(ia)}),Y.appendChild(Z));G.appendChild(Y);var X=[],fa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var ia=I.div.querySelector(".geCommentEditTxtArea"),V=I.div.querySelector(".geCommentEditBtns");I.comment.content=ia.value;ia.parentNode.removeChild(ia);V.parentNode.removeChild(V)}catch(L){b.handleError(L)}ca.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(L){function ea(O){if(null!=O){O.sort(function(ba,la){return new Date(ba.modifiedDate)-new Date(la.modifiedDate)});for(var N=0;N<O.length;N++)ea(O[N].replies)}}L.sort(function(O,N){return new Date(O.modifiedDate)-new Date(N.modifiedDate)});ca.innerText="";ca.appendChild(aa);aa.style.display="block";X=L;for(L=0;L<X.length;L++)ea(X[L].replies),
+y(X[L],X,null,0,Q);null!=I&&null==I.comment.id&&null==I.comment.pCommentId&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(L){ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(L&&L.message?": "+L.message:""));this.hasError=!0})):ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});fa();this.refreshComments=fa;Y=mxUtils.bind(this,function(){function ia(N){var ba=L[N.id];if(null!=ba)for(f(N,ba),ba=0;null!=N.replies&&ba<N.replies.length;ba++)ia(N.replies[ba])}
+if(this.window.isVisible()){for(var V=ca.querySelectorAll(".geCommentDate"),L={},ea=0;ea<V.length;ea++){var O=V[ea];L[O.getAttribute("data-commentId")]=O}for(ea=0;ea<X.length;ea++)ia(X[ea])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ia,V){var L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ia=Math.max(0,Math.min(ia,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));V=Math.max(0,Math.min(V,L-this.table.clientHeight-48));this.getX()==ia&&this.getY()==V||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=
+mxUtils.bind(this,function(){var ia=this.window.getX(),V=this.window.getY();this.window.setLocation(ia,V)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,
+e);q.appendChild(y);null!=g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,
+t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);
+f?(g.style.marginTop="10px",y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3870,40 +3870,40 @@ f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,4
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(J){return I.isVertex(J)&&t(J)}function D(J){var W=
-!1;null!=J&&(W="1"==C.getCurrentCellStyle(J).treeMoving);return W}function t(J){var W=!1;null!=J&&(J=I.getParent(J),W=C.view.getState(J),W="tree"==(null!=W?W.style:C.getCellStyle(J)).containerType);return W}function E(J){var W=!1;null!=J&&(J=I.getParent(J),W=C.view.getState(J),C.view.getState(J),W=null!=(null!=W?W.style:C.getCellStyle(J)).childLayout);return W}function d(J){J=C.view.getState(J);if(null!=J){var W=C.getIncomingTreeEdges(J.cell);if(0<W.length&&(W=C.view.getState(W[0]),null!=W&&(W=W.absolutePoints,
-null!=W&&0<W.length&&(W=W[W.length-1],null!=W)))){if(W.y==J.y&&Math.abs(W.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(W.y==J.y+J.height&&Math.abs(W.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(W.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(J,W){W=null!=W?W:!0;C.model.beginUpdate();try{var Q=C.model.getParent(J),S=C.getIncomingTreeEdges(J),ha=C.cloneCells([S[0],J]);C.model.setTerminal(ha[0],C.model.getTerminal(S[0],
-!0),!0);var la=d(J),u=Q.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ha[1].geometry.x+=W?J.geometry.width+10:-ha[1].geometry.width-10:ha[1].geometry.y+=W?J.geometry.height+10:-ha[1].geometry.height-10;C.view.currentRoot!=Q&&(ha[1].geometry.x-=u.x,ha[1].geometry.y-=u.y);var H=C.view.getState(J),O=C.view.scale;if(null!=H){var T=mxRectangle.fromRectangle(H);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?T.x+=(W?J.geometry.width+10:-ha[1].geometry.width-
-10)*O:T.y+=(W?J.geometry.height+10:-ha[1].geometry.height-10)*O;var R=C.getOutgoingTreeEdges(C.model.getTerminal(S[0],!0));if(null!=R){for(var da=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,P=u=S=0;P<R.length;P++){var ma=C.model.getTerminal(R[P],!1);if(la==d(ma)){var ra=C.view.getState(ma);ma!=J&&null!=ra&&(da&&W!=ra.getCenterX()<H.getCenterX()||!da&&W!=ra.getCenterY()<H.getCenterY())&&mxUtils.intersects(T,ra)&&(S=10+Math.max(S,(Math.min(T.x+T.width,ra.x+ra.width)-Math.max(T.x,
-ra.x))/O),u=10+Math.max(u,(Math.min(T.y+T.height,ra.y+ra.height)-Math.max(T.y,ra.y))/O))}}da?u=0:S=0;for(P=0;P<R.length;P++)if(ma=C.model.getTerminal(R[P],!1),la==d(ma)&&(ra=C.view.getState(ma),ma!=J&&null!=ra&&(da&&W!=ra.getCenterX()<H.getCenterX()||!da&&W!=ra.getCenterY()<H.getCenterY()))){var xa=[];C.traverse(ra.cell,!0,function(ta,Aa){var Ca=null!=Aa&&C.isTreeEdge(Aa);Ca&&xa.push(Aa);(null==Aa||Ca)&&xa.push(ta);return null==Aa||Ca});C.moveCells(xa,(W?1:-1)*S,(W?1:-1)*u)}}}return C.addCells(ha,
-Q)}finally{C.model.endUpdate()}}function g(J){C.model.beginUpdate();try{var W=d(J),Q=C.getIncomingTreeEdges(J),S=C.cloneCells([Q[0],J]);C.model.setTerminal(Q[0],S[1],!1);C.model.setTerminal(S[0],S[1],!0);C.model.setTerminal(S[0],J,!1);var ha=C.model.getParent(J),la=ha.geometry,u=[];C.view.currentRoot!=ha&&(S[1].geometry.x-=la.x,S[1].geometry.y-=la.y);C.traverse(J,!0,function(T,R){var da=null!=R&&C.isTreeEdge(R);da&&u.push(R);(null==R||da)&&u.push(T);return null==R||da});var H=J.geometry.width+40,
-O=J.geometry.height+40;W==mxConstants.DIRECTION_SOUTH?H=0:W==mxConstants.DIRECTION_NORTH?(H=0,O=-O):W==mxConstants.DIRECTION_WEST?(H=-H,O=0):W==mxConstants.DIRECTION_EAST&&(O=0);C.moveCells(u,H,O);return C.addCells(S,ha)}finally{C.model.endUpdate()}}function m(J,W){C.model.beginUpdate();try{var Q=C.model.getParent(J),S=C.getIncomingTreeEdges(J),ha=d(J);0==S.length&&(S=[C.createEdge(Q,null,"",null,null,C.createCurrentEdgeStyle())],ha=W);var la=C.cloneCells([S[0],J]);C.model.setTerminal(la[0],J,!0);
-if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],la[1],!1);var u=C.getCellStyle(la[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),O;for(O in H)C.setCellStyles(O,H[O],[la[0]]),"edgeStyle"==O&&"elbowEdgeStyle"==H[O]&&C.setCellStyles("elbow",ha==mxConstants.DIRECTION_SOUTH||ha==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(ra){}}S=C.getOutgoingTreeEdges(J);var T=Q.geometry;W=[];C.view.currentRoot==Q&&(T=new mxRectangle);for(u=0;u<S.length;u++){var R=C.model.getTerminal(S[u],
-!1);null!=R&&W.push(R)}var da=C.view.getBounds(W),P=C.view.translate,ma=C.view.scale;ha==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?J.geometry.x+(J.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ma-P.x-T.x+10,la[1].geometry.y+=la[1].geometry.height-T.y+40):ha==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?J.geometry.x+(J.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ma-P.x+-T.x+10,la[1].geometry.y-=la[1].geometry.height+T.y+40):(la[1].geometry.x=ha==mxConstants.DIRECTION_WEST?
-la[1].geometry.x-(la[1].geometry.width+T.x+40):la[1].geometry.x+(la[1].geometry.width-T.x+40),la[1].geometry.y=null==da?J.geometry.y+(J.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/ma-P.y+-T.y+10);return C.addCells(la,Q)}finally{C.model.endUpdate()}}function q(J,W,Q){J=C.getOutgoingTreeEdges(J);Q=C.view.getState(Q);var S=[];if(null!=Q&&null!=J){for(var ha=0;ha<J.length;ha++){var la=C.view.getState(C.model.getTerminal(J[ha],!1));null!=la&&(!W&&Math.min(la.x+la.width,Q.x+Q.width)>=Math.max(la.x,
-Q.x)||W&&Math.min(la.y+la.height,Q.y+Q.height)>=Math.max(la.y,Q.y))&&S.push(la)}S.sort(function(u,H){return W?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return S}function y(J,W){var Q=d(J),S=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==S&&Q!=W?F.actions.get("selectParent").funct():Q==W?(W=C.getOutgoingTreeEdges(J),null!=W&&0<W.length&&C.setSelectionCell(C.model.getTerminal(W[0],!1))):(Q=C.getIncomingTreeEdges(J),
-null!=Q&&0<Q.length&&(S=q(C.model.getTerminal(Q[0],!0),S,J),J=C.view.getState(J),null!=J&&(J=mxUtils.indexOf(S,J),0<=J&&(J+=W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=S.length-1&&C.setSelectionCell(S[J].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(J,W,Q){G.apply(this,arguments);if(1==C.getSelectionCount()){W=C.getSelectionCell();var S=C.getOutgoingTreeEdges(W);J.addSeparator();0<S.length&&(n(C.getSelectionCell())&&
-this.addMenuItems(J,["selectChildren"],null,Q),this.addMenuItems(J,["selectDescendants"],null,Q));n(C.getSelectionCell())?(J.addSeparator(),0<C.getIncomingTreeEdges(W).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,Q)):0<C.model.getEdgeCount(W)&&this.addMenuItems(J,["selectConnections"],null,Q)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=C.getSelectionCell();J=C.getOutgoingTreeEdges(J);if(null!=J){for(var W=[],Q=0;Q<J.length;Q++)W.push(C.model.getTerminal(J[Q],
-!1));C.setSelectionCells(W)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=C.getSelectionCell();J=C.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=C.getOutgoingTreeEdges(C.model.getTerminal(J[0],!0)),null!=J)){for(var W=[],Q=0;Q<J.length;Q++)W.push(C.model.getTerminal(J[Q],!1));C.setSelectionCells(W)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=
-C.getSelectionCell();J=C.getIncomingTreeEdges(J);null!=J&&0<J.length&&C.setSelectionCell(C.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(J,W){J=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(J)){if(null!=W&&mxEvent.isAltDown(W))C.setSelectionCells(C.model.getTreeEdges(J,null==W||!mxEvent.isShiftDown(W),null==W||!mxEvent.isControlDown(W)));else{var Q=[];C.traverse(J,!0,function(S,ha){var la=null!=ha&&C.isTreeEdge(ha);la&&Q.push(ha);
-null!=ha&&!la||null!=W&&mxEvent.isShiftDown(W)||Q.push(S);return null==ha||la})}C.setSelectionCells(Q)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(J,W){W=null!=W?W:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));W&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var Q=[],S=0;S<J.length;S++){var ha=J[S];I.isEdge(ha)&&t(ha)&&(Q.push(ha),ha=I.getTerminal(ha,!1));if(n(ha)){var la=[];C.traverse(ha,!0,function(u,H){var O=null!=H&&C.isTreeEdge(H);O&&la.push(H);
-(null==H||O)&&la.push(u);return null==H||O});0<la.length&&(Q=Q.concat(la),ha=C.getIncomingTreeEdges(J[S]),J=J.concat(ha))}else null!=ha&&Q.push(J[S])}J=Q;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(J,W,Q){return n(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(W,Q))};var ca=C.duplicateCells;C.duplicateCells=function(J,W){J=null!=J?J:this.getSelectionCells();for(var Q=J.slice(0),S=0;S<Q.length;S++){var ha=C.view.getState(Q[S]);if(null!=ha&&n(ha.cell)){var la=C.getIncomingTreeEdges(ha.cell);
-for(ha=0;ha<la.length;ha++)mxUtils.remove(la[ha],J)}}this.model.beginUpdate();try{var u=ca.call(this,J,W);if(u.length==J.length)for(S=0;S<J.length;S++)if(n(J[S])){var H=C.getIncomingTreeEdges(u[S]);la=C.getIncomingTreeEdges(J[S]);if(0==H.length&&0<la.length){var O=this.cloneCell(la[0]);this.addEdge(O,C.getDefaultParent(),this.model.getTerminal(la[0],!0),u[S])}}}finally{this.model.endUpdate()}return u};var ba=C.moveCells;C.moveCells=function(J,W,Q,S,ha,la,u){var H=null;this.model.beginUpdate();try{var O=
-ha,T=this.getCurrentCellStyle(ha);if(null!=J&&n(ha)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(var R=0;R<J.length;R++)if(n(J[R])||C.model.isEdge(J[R])&&null==C.model.getTerminal(J[R],!0)){ha=C.model.getParent(J[R]);break}if(null!=O&&ha!=O&&null!=this.view.getState(J[0])){var da=C.getIncomingTreeEdges(J[0]);if(0<da.length){var P=C.view.getState(C.model.getTerminal(da[0],!0));if(null!=P){var ma=C.view.getState(O);null!=ma&&(W=(ma.getCenterX()-P.getCenterX())/C.view.scale,Q=(ma.getCenterY()-P.getCenterY())/
-C.view.scale)}}}}H=ba.apply(this,arguments);if(null!=H&&null!=J&&H.length==J.length)for(R=0;R<H.length;R++)if(this.model.isEdge(H[R]))n(O)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[R],!0))&&this.model.setTerminal(H[R],O,!0);else if(n(J[R])&&(da=C.getIncomingTreeEdges(J[R]),0<da.length))if(!S)n(O)&&0>mxUtils.indexOf(J,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],O,!0);else if(0==C.getIncomingTreeEdges(H[R]).length){T=O;if(null==T||T==C.model.getParent(J[R]))T=C.model.getTerminal(da[0],
-!0);S=this.cloneCell(da[0]);this.addEdge(S,C.getDefaultParent(),T,H[R])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var Z=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(J,W,Q,S){var ha=C.model,la=null;ha.beginUpdate();try{if(la=Z.apply(this,arguments),n(J))for(var u=0;u<la.length;u++)if(ha.isEdge(la[u])&&null==ha.getTerminal(la[u],!0)){ha.setTerminal(la[u],J,!0);var H=C.getCellGeometry(la[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{ha.endUpdate()}return la}}var qa=
-{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},N=F.onKeyDown;F.onKeyDown=function(J){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var W=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==J.which?W=mxEvent.isShiftDown(J)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==J.which&&(W=f(C.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=W&&0<W.length)1==
-W.length&&C.model.isEdge(W[0])?C.setSelectionCell(C.model.getTerminal(W[0],!1)):C.setSelectionCell(W[W.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var Q=qa[J.keyCode];null!=Q&&(Q.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(J)):39==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(S){F.handleError(S)}mxEvent.isConsumed(J)||N.apply(this,arguments)};var Y=C.connectVertex;C.connectVertex=function(J,W,Q,S,ha,la,u){var H=C.getIncomingTreeEdges(J);if(n(J)){var O=d(J),T=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST,R=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;
-return O==W||0==H.length?m(J,W):T==R?g(J):f(J,W!=mxConstants.DIRECTION_NORTH&&W!=mxConstants.DIRECTION_WEST)}return Y.apply(this,arguments)};C.getSubtree=function(J){var W=[J];!D(J)&&!n(J)||E(J)||C.traverse(J,!0,function(Q,S){var ha=null!=S&&C.isTreeEdge(S);ha&&0>mxUtils.indexOf(W,S)&&W.push(S);(null==S||ha)&&0>mxUtils.indexOf(W,Q)&&W.push(Q);return null==S||ha});return W};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
-n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,
-mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(J)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,W){V.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
-typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
-t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var d=new mxCell("Topic",
-new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);
-var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(L){return I.isVertex(L)&&t(L)}function D(L){var ea=
+!1;null!=L&&(ea="1"==C.getCurrentCellStyle(L).treeMoving);return ea}function t(L){var ea=!1;null!=L&&(L=I.getParent(L),ea=C.view.getState(L),ea="tree"==(null!=ea?ea.style:C.getCellStyle(L)).containerType);return ea}function E(L){var ea=!1;null!=L&&(L=I.getParent(L),ea=C.view.getState(L),C.view.getState(L),ea=null!=(null!=ea?ea.style:C.getCellStyle(L)).childLayout);return ea}function d(L){L=C.view.getState(L);if(null!=L){var ea=C.getIncomingTreeEdges(L.cell);if(0<ea.length&&(ea=C.view.getState(ea[0]),
+null!=ea&&(ea=ea.absolutePoints,null!=ea&&0<ea.length&&(ea=ea[ea.length-1],null!=ea)))){if(ea.y==L.y&&Math.abs(ea.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(ea.y==L.y+L.height&&Math.abs(ea.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(ea.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(L,ea){ea=null!=ea?ea:!0;C.model.beginUpdate();try{var O=C.model.getParent(L),N=C.getIncomingTreeEdges(L),ba=C.cloneCells([N[0],
+L]);C.model.setTerminal(ba[0],C.model.getTerminal(N[0],!0),!0);var la=d(L),u=O.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ba[1].geometry.x+=ea?L.geometry.width+10:-ba[1].geometry.width-10:ba[1].geometry.y+=ea?L.geometry.height+10:-ba[1].geometry.height-10;C.view.currentRoot!=O&&(ba[1].geometry.x-=u.x,ba[1].geometry.y-=u.y);var H=C.view.getState(L),P=C.view.scale;if(null!=H){var T=mxRectangle.fromRectangle(H);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?
+T.x+=(ea?L.geometry.width+10:-ba[1].geometry.width-10)*P:T.y+=(ea?L.geometry.height+10:-ba[1].geometry.height-10)*P;var S=C.getOutgoingTreeEdges(C.model.getTerminal(N[0],!0));if(null!=S){for(var da=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,R=u=N=0;R<S.length;R++){var ma=C.model.getTerminal(S[R],!1);if(la==d(ma)){var ra=C.view.getState(ma);ma!=L&&null!=ra&&(da&&ea!=ra.getCenterX()<H.getCenterX()||!da&&ea!=ra.getCenterY()<H.getCenterY())&&mxUtils.intersects(T,ra)&&(N=10+Math.max(N,
+(Math.min(T.x+T.width,ra.x+ra.width)-Math.max(T.x,ra.x))/P),u=10+Math.max(u,(Math.min(T.y+T.height,ra.y+ra.height)-Math.max(T.y,ra.y))/P))}}da?u=0:N=0;for(R=0;R<S.length;R++)if(ma=C.model.getTerminal(S[R],!1),la==d(ma)&&(ra=C.view.getState(ma),ma!=L&&null!=ra&&(da&&ea!=ra.getCenterX()<H.getCenterX()||!da&&ea!=ra.getCenterY()<H.getCenterY()))){var xa=[];C.traverse(ra.cell,!0,function(ta,Aa){var Ca=null!=Aa&&C.isTreeEdge(Aa);Ca&&xa.push(Aa);(null==Aa||Ca)&&xa.push(ta);return null==Aa||Ca});C.moveCells(xa,
+(ea?1:-1)*N,(ea?1:-1)*u)}}}return C.addCells(ba,O)}finally{C.model.endUpdate()}}function g(L){C.model.beginUpdate();try{var ea=d(L),O=C.getIncomingTreeEdges(L),N=C.cloneCells([O[0],L]);C.model.setTerminal(O[0],N[1],!1);C.model.setTerminal(N[0],N[1],!0);C.model.setTerminal(N[0],L,!1);var ba=C.model.getParent(L),la=ba.geometry,u=[];C.view.currentRoot!=ba&&(N[1].geometry.x-=la.x,N[1].geometry.y-=la.y);C.traverse(L,!0,function(T,S){var da=null!=S&&C.isTreeEdge(S);da&&u.push(S);(null==S||da)&&u.push(T);
+return null==S||da});var H=L.geometry.width+40,P=L.geometry.height+40;ea==mxConstants.DIRECTION_SOUTH?H=0:ea==mxConstants.DIRECTION_NORTH?(H=0,P=-P):ea==mxConstants.DIRECTION_WEST?(H=-H,P=0):ea==mxConstants.DIRECTION_EAST&&(P=0);C.moveCells(u,H,P);return C.addCells(N,ba)}finally{C.model.endUpdate()}}function m(L,ea){C.model.beginUpdate();try{var O=C.model.getParent(L),N=C.getIncomingTreeEdges(L),ba=d(L);0==N.length&&(N=[C.createEdge(O,null,"",null,null,C.createCurrentEdgeStyle())],ba=ea);var la=C.cloneCells([N[0],
+L]);C.model.setTerminal(la[0],L,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],la[1],!1);var u=C.getCellStyle(la[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),P;for(P in H)C.setCellStyles(P,H[P],[la[0]]),"edgeStyle"==P&&"elbowEdgeStyle"==H[P]&&C.setCellStyles("elbow",ba==mxConstants.DIRECTION_SOUTH||ba==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(ra){}}N=C.getOutgoingTreeEdges(L);var T=O.geometry;ea=[];C.view.currentRoot==O&&(T=new mxRectangle);for(u=
+0;u<N.length;u++){var S=C.model.getTerminal(N[u],!1);null!=S&&ea.push(S)}var da=C.view.getBounds(ea),R=C.view.translate,ma=C.view.scale;ba==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ma-R.x-T.x+10,la[1].geometry.y+=la[1].geometry.height-T.y+40):ba==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ma-R.x+-T.x+10,la[1].geometry.y-=la[1].geometry.height+
+T.y+40):(la[1].geometry.x=ba==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+T.x+40):la[1].geometry.x+(la[1].geometry.width-T.x+40),la[1].geometry.y=null==da?L.geometry.y+(L.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/ma-R.y+-T.y+10);return C.addCells(la,O)}finally{C.model.endUpdate()}}function q(L,ea,O){L=C.getOutgoingTreeEdges(L);O=C.view.getState(O);var N=[];if(null!=O&&null!=L){for(var ba=0;ba<L.length;ba++){var la=C.view.getState(C.model.getTerminal(L[ba],!1));
+null!=la&&(!ea&&Math.min(la.x+la.width,O.x+O.width)>=Math.max(la.x,O.x)||ea&&Math.min(la.y+la.height,O.y+O.height)>=Math.max(la.y,O.y))&&N.push(la)}N.sort(function(u,H){return ea?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return N}function y(L,ea){var O=d(L),N=ea==mxConstants.DIRECTION_EAST||ea==mxConstants.DIRECTION_WEST;(O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST)==N&&O!=ea?F.actions.get("selectParent").funct():O==ea?(ea=C.getOutgoingTreeEdges(L),null!=ea&&0<ea.length&&
+C.setSelectionCell(C.model.getTerminal(ea[0],!1))):(O=C.getIncomingTreeEdges(L),null!=O&&0<O.length&&(N=q(C.model.getTerminal(O[0],!0),N,L),L=C.view.getState(L),null!=L&&(L=mxUtils.indexOf(N,L),0<=L&&(L+=ea==mxConstants.DIRECTION_NORTH||ea==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=N.length-1&&C.setSelectionCell(N[L].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(L,ea,O){G.apply(this,arguments);if(1==C.getSelectionCount()){ea=C.getSelectionCell();
+var N=C.getOutgoingTreeEdges(ea);L.addSeparator();0<N.length&&(n(C.getSelectionCell())&&this.addMenuItems(L,["selectChildren"],null,O),this.addMenuItems(L,["selectDescendants"],null,O));n(C.getSelectionCell())?(L.addSeparator(),0<C.getIncomingTreeEdges(ea).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,O)):0<C.model.getEdgeCount(ea)&&this.addMenuItems(L,["selectConnections"],null,O)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=
+C.getSelectionCell();L=C.getOutgoingTreeEdges(L);if(null!=L){for(var ea=[],O=0;O<L.length;O++)ea.push(C.model.getTerminal(L[O],!1));C.setSelectionCells(ea)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=C.getSelectionCell();L=C.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=C.getOutgoingTreeEdges(C.model.getTerminal(L[0],!0)),null!=L)){for(var ea=[],O=0;O<L.length;O++)ea.push(C.model.getTerminal(L[O],!1));C.setSelectionCells(ea)}}},
+null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=C.getSelectionCell();L=C.getIncomingTreeEdges(L);null!=L&&0<L.length&&C.setSelectionCell(C.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(L,ea){L=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(L)){if(null!=ea&&mxEvent.isAltDown(ea))C.setSelectionCells(C.model.getTreeEdges(L,null==ea||!mxEvent.isShiftDown(ea),null==
+ea||!mxEvent.isControlDown(ea)));else{var O=[];C.traverse(L,!0,function(N,ba){var la=null!=ba&&C.isTreeEdge(ba);la&&O.push(ba);null!=ba&&!la||null!=ea&&mxEvent.isShiftDown(ea)||O.push(N);return null==ba||la})}C.setSelectionCells(O)}},null,null,"Alt+Shift+D");var Z=C.removeCells;C.removeCells=function(L,ea){ea=null!=ea?ea:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));ea&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var O=[],N=0;N<L.length;N++){var ba=L[N];I.isEdge(ba)&&t(ba)&&
+(O.push(ba),ba=I.getTerminal(ba,!1));if(n(ba)){var la=[];C.traverse(ba,!0,function(u,H){var P=null!=H&&C.isTreeEdge(H);P&&la.push(H);(null==H||P)&&la.push(u);return null==H||P});0<la.length&&(O=O.concat(la),ba=C.getIncomingTreeEdges(L[N]),L=L.concat(ba))}else null!=ba&&O.push(L[N])}L=O;return Z.apply(this,arguments)};F.hoverIcons.getStateAt=function(L,ea,O){return n(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(ea,O))};var ca=C.duplicateCells;C.duplicateCells=function(L,ea){L=null!=L?
+L:this.getSelectionCells();for(var O=L.slice(0),N=0;N<O.length;N++){var ba=C.view.getState(O[N]);if(null!=ba&&n(ba.cell)){var la=C.getIncomingTreeEdges(ba.cell);for(ba=0;ba<la.length;ba++)mxUtils.remove(la[ba],L)}}this.model.beginUpdate();try{var u=ca.call(this,L,ea);if(u.length==L.length)for(N=0;N<L.length;N++)if(n(L[N])){var H=C.getIncomingTreeEdges(u[N]);la=C.getIncomingTreeEdges(L[N]);if(0==H.length&&0<la.length){var P=this.cloneCell(la[0]);this.addEdge(P,C.getDefaultParent(),this.model.getTerminal(la[0],
+!0),u[N])}}}finally{this.model.endUpdate()}return u};var aa=C.moveCells;C.moveCells=function(L,ea,O,N,ba,la,u){var H=null;this.model.beginUpdate();try{var P=ba,T=this.getCurrentCellStyle(ba);if(null!=L&&n(ba)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(var S=0;S<L.length;S++)if(n(L[S])||C.model.isEdge(L[S])&&null==C.model.getTerminal(L[S],!0)){ba=C.model.getParent(L[S]);break}if(null!=P&&ba!=P&&null!=this.view.getState(L[0])){var da=C.getIncomingTreeEdges(L[0]);if(0<da.length){var R=C.view.getState(C.model.getTerminal(da[0],
+!0));if(null!=R){var ma=C.view.getState(P);null!=ma&&(ea=(ma.getCenterX()-R.getCenterX())/C.view.scale,O=(ma.getCenterY()-R.getCenterY())/C.view.scale)}}}}H=aa.apply(this,arguments);if(null!=H&&null!=L&&H.length==L.length)for(S=0;S<H.length;S++)if(this.model.isEdge(H[S]))n(P)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[S],!0))&&this.model.setTerminal(H[S],P,!0);else if(n(L[S])&&(da=C.getIncomingTreeEdges(L[S]),0<da.length))if(!N)n(P)&&0>mxUtils.indexOf(L,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],
+P,!0);else if(0==C.getIncomingTreeEdges(H[S]).length){T=P;if(null==T||T==C.model.getParent(L[S]))T=C.model.getTerminal(da[0],!0);N=this.cloneCell(da[0]);this.addEdge(N,C.getDefaultParent(),T,H[S])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(L,ea,O,N){var ba=C.model,la=null;ba.beginUpdate();try{if(la=Y.apply(this,arguments),n(L))for(var u=0;u<la.length;u++)if(ba.isEdge(la[u])&&null==ba.getTerminal(la[u],!0)){ba.setTerminal(la[u],
+L,!0);var H=C.getCellGeometry(la[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{ba.endUpdate()}return la}}var qa={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},Q=F.onKeyDown;F.onKeyDown=function(L){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var ea=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==L.which?ea=mxEvent.isShiftDown(L)?
+g(C.getSelectionCell()):m(C.getSelectionCell()):13==L.which&&(ea=f(C.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=ea&&0<ea.length)1==ea.length&&C.model.isEdge(ea[0])?C.setSelectionCell(C.model.getTerminal(ea[0],!1)):C.setSelectionCell(ea[ea.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var O=qa[L.keyCode];null!=O&&(O.funct(L),mxEvent.consume(L))}else 37==
+L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(L)):39==L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(N){F.handleError(N)}mxEvent.isConsumed(L)||Q.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(L,ea,O,N,ba,la,u){var H=C.getIncomingTreeEdges(L);
+if(n(L)){var P=d(L),T=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,S=ea==mxConstants.DIRECTION_EAST||ea==mxConstants.DIRECTION_WEST;return P==ea||0==H.length?m(L,ea):T==S?g(L):f(L,ea!=mxConstants.DIRECTION_NORTH&&ea!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(L){var ea=[L];!D(L)&&!n(L)||E(L)||C.traverse(L,!0,function(O,N){var ba=null!=N&&C.isTreeEdge(N);ba&&0>mxUtils.indexOf(ea,N)&&ea.push(N);(null==N||ba)&&0>mxUtils.indexOf(ea,O)&&ea.push(O);
+return null==N||ba});return ea};var fa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){fa.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height=
+"24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(L)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ia=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(L,ea){V.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
+!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+E.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;
+E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
y.geometry.relative=!0;y.edge=!0;E.insertEdge(y,!0);q.insertEdge(y,!1);var F=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var C=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(m);t.insert(y);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
@@ -3917,27 +3917,27 @@ m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(N,Y){if(EditorUi.windowed){var ea=N.editor.graph;ea.popupMenuHandler.hideMenu();if(null==N.formatWindow){Y="1"==urlParams.sketch?Math.max(10,N.diagramContainer.clientWidth-241):Math.max(10,N.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);N.formatWindow=new t(N,mxResources.get("format"),Y,ka,240,ea,function(V){var J=
-N.createFormat(V);J.init();N.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});N.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){N.formatWindow.window.fit()}));N.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else N.formatWindow.window.setVisible(null!=Y?Y:!N.formatWindow.window.isVisible())}else{if(null==N.formatElt){N.formatElt=D();var ja=N.createFormat(N.formatElt);ja.init();N.formatElt.style.border="none";N.formatElt.style.width=
-"240px";N.formatElt.style.borderLeft="1px solid gray";N.formatElt.style.right="0px";N.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=N.diagramContainer.parentNode;null!=N.formatElt.parentNode?(N.formatElt.parentNode.removeChild(N.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(N.formatElt),ea.style.right=N.formatElt.style.width)}}function e(N,Y){function ea(J,W){var Q=N.menus.get(J);J=V.addMenu(W,mxUtils.bind(this,function(){Q.funct.apply(this,arguments)}));
-J.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";J.className="geTitle";Y.appendChild(J);return J}var ka=document.createElement("div");ka.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
-"5px";ja.innerHTML="+";ka.appendChild(ja);mxUtils.write(ka,mxResources.get("moreShapes"));Y.appendChild(ka);mxEvent.addListener(ka,"click",function(){N.actions.get("shapes").funct()});var V=new Menubar(N,Y);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ka.style.bottom="0":null!=N.actions.get("newLibrary")?(ka=document.createElement("div"),ka.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-ka.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),ka.appendChild(ja),Y.appendChild(ka),mxEvent.addListener(ka,"click",N.actions.get("newLibrary").funct),ka=document.createElement("div"),ka.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",ka.className="geTitle",ja=
-document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("openLibrary")),ka.appendChild(ja),Y.appendChild(ka),mxEvent.addListener(ka,"click",N.actions.get("openLibrary").funct)):(ka=ea("newLibrary",mxResources.get("newLibrary")),ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="0",ka=ea("openLibraryFrom",mxResources.get("openLibraryFrom")),ka.style.borderLeft="1px solid lightgray",
-ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="50%");Y.appendChild(N.sidebar.container);Y.style.overflow="hidden"}function k(N,Y){if(EditorUi.windowed){var ea=N.editor.graph;ea.popupMenuHandler.hideMenu();if(null==N.sidebarWindow){Y=Math.min(ea.container.clientWidth-10,218);var ka="1"==urlParams.embedInline?650:Math.min(ea.container.clientHeight-40,650);N.sidebarWindow=new t(N,mxResources.get("shapes"),"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ea.container.clientHeight-ka)/2):56,Y-6,ka-6,function(ja){e(N,ja)});N.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){N.sidebarWindow.window.fit()}));N.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);N.sidebarWindow.window.setVisible(!0);isLocalStorage&&N.getLocalData("sidebar",function(ja){N.sidebar.showEntries(ja,null,!0)});N.restoreLibraries()}else N.sidebarWindow.window.setVisible(null!=
-Y?Y:!N.sidebarWindow.window.isVisible())}else null==N.sidebarElt&&(N.sidebarElt=D(),e(N,N.sidebarElt),N.sidebarElt.style.border="none",N.sidebarElt.style.width="210px",N.sidebarElt.style.borderRight="1px solid gray"),ea=N.diagramContainer.parentNode,null!=N.sidebarElt.parentNode?(N.sidebarElt.parentNode.removeChild(N.sidebarElt),ea.style.left="0px"):(ea.parentNode.appendChild(N.sidebarElt),ea.style.left=N.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
-"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(N){}var D=function(){var N=document.createElement("div");N.className="geSidebarContainer";N.style.position="absolute";N.style.width="100%";N.style.height="100%";N.style.border="1px solid whiteSmoke";N.style.overflowX="hidden";N.style.overflowY="auto";return N},t=function(N,Y,ea,ka,ja,V,J){var W=D();J(W);this.window=new mxWindow(Y,W,ea,ka,
-ja,V,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(Q,S){var ha=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;Q=Math.max(0,Math.min(Q,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));S=Math.max(0,Math.min(S,ha-la.clientHeight-
-2));this.getX()==Q&&this.getY()==S||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&N.isSelectionAllowed(Q)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=
+EditorUi.initMinimalTheme=function(){function b(Q,X){if(EditorUi.windowed){var fa=Q.editor.graph;fa.popupMenuHandler.hideMenu();if(null==Q.formatWindow){X="1"==urlParams.sketch?Math.max(10,Q.diagramContainer.clientWidth-241):Math.max(10,Q.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;fa="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,fa.container.clientHeight-10);Q.formatWindow=new t(Q,mxResources.get("format"),X,ka,240,fa,function(V){var L=
+Q.createFormat(V);L.init();Q.addListener("darkModeChanged",mxUtils.bind(this,function(){L.refresh()}));return L});Q.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.formatWindow.window.fit()}));Q.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else Q.formatWindow.window.setVisible(null!=X?X:!Q.formatWindow.window.isVisible())}else{if(null==Q.formatElt){Q.formatElt=D();var ia=Q.createFormat(Q.formatElt);ia.init();Q.formatElt.style.border="none";Q.formatElt.style.width=
+"240px";Q.formatElt.style.borderLeft="1px solid gray";Q.formatElt.style.right="0px";Q.addListener("darkModeChanged",mxUtils.bind(this,function(){ia.refresh()}))}fa=Q.diagramContainer.parentNode;null!=Q.formatElt.parentNode?(Q.formatElt.parentNode.removeChild(Q.formatElt),fa.style.right="0px"):(fa.parentNode.appendChild(Q.formatElt),fa.style.right=Q.formatElt.style.width)}}function e(Q,X){function fa(L,ea){var O=Q.menus.get(L);L=V.addMenu(ea,mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));
+L.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";L.className="geTitle";X.appendChild(L);return L}var ka=document.createElement("div");ka.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ka.className="geTitle";var ia=document.createElement("span");ia.style.fontSize="18px";ia.style.marginRight=
+"5px";ia.innerHTML="+";ka.appendChild(ia);mxUtils.write(ka,mxResources.get("moreShapes"));X.appendChild(ka);mxEvent.addListener(ka,"click",function(){Q.actions.get("shapes").funct()});var V=new Menubar(Q,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ka.style.bottom="0":null!=Q.actions.get("newLibrary")?(ka=document.createElement("div"),ka.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+ka.className="geTitle",ia=document.createElement("span"),ia.style.cssText="position:relative;top:6px;",mxUtils.write(ia,mxResources.get("newLibrary")),ka.appendChild(ia),X.appendChild(ka),mxEvent.addListener(ka,"click",Q.actions.get("newLibrary").funct),ka=document.createElement("div"),ka.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",ka.className="geTitle",ia=
+document.createElement("span"),ia.style.cssText="position:relative;top:6px;",mxUtils.write(ia,mxResources.get("openLibrary")),ka.appendChild(ia),X.appendChild(ka),mxEvent.addListener(ka,"click",Q.actions.get("openLibrary").funct)):(ka=fa("newLibrary",mxResources.get("newLibrary")),ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="0",ka=fa("openLibraryFrom",mxResources.get("openLibraryFrom")),ka.style.borderLeft="1px solid lightgray",
+ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="50%");X.appendChild(Q.sidebar.container);X.style.overflow="hidden"}function k(Q,X){if(EditorUi.windowed){var fa=Q.editor.graph;fa.popupMenuHandler.hideMenu();if(null==Q.sidebarWindow){X=Math.min(fa.container.clientWidth-10,218);var ka="1"==urlParams.embedInline?650:Math.min(fa.container.clientHeight-40,650);Q.sidebarWindow=new t(Q,mxResources.get("shapes"),"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(fa.container.clientHeight-ka)/2):56,X-6,ka-6,function(ia){e(Q,ia)});Q.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.sidebarWindow.window.fit()}));Q.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);Q.sidebarWindow.window.setVisible(!0);isLocalStorage&&Q.getLocalData("sidebar",function(ia){Q.sidebar.showEntries(ia,null,!0)});Q.restoreLibraries()}else Q.sidebarWindow.window.setVisible(null!=
+X?X:!Q.sidebarWindow.window.isVisible())}else null==Q.sidebarElt&&(Q.sidebarElt=D(),e(Q,Q.sidebarElt),Q.sidebarElt.style.border="none",Q.sidebarElt.style.width="210px",Q.sidebarElt.style.borderRight="1px solid gray"),fa=Q.diagramContainer.parentNode,null!=Q.sidebarElt.parentNode?(Q.sidebarElt.parentNode.removeChild(Q.sidebarElt),fa.style.left="0px"):(fa.parentNode.appendChild(Q.sidebarElt),fa.style.left=Q.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
+"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(Q){}var D=function(){var Q=document.createElement("div");Q.className="geSidebarContainer";Q.style.position="absolute";Q.style.width="100%";Q.style.height="100%";Q.style.border="1px solid whiteSmoke";Q.style.overflowX="hidden";Q.style.overflowY="auto";return Q},t=function(Q,X,fa,ka,ia,V,L){var ea=D();L(ea);this.window=new mxWindow(X,ea,fa,
+ka,ia,V,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(O,N){var ba=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;O=Math.max(0,Math.min(O,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));N=Math.max(0,Math.min(N,ba-la.clientHeight-
+2));this.getX()==O&&this.getY()==N||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(O){null==O&&(O=window.event);return null!=O&&Q.isSelectionAllowed(O)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(N){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(N);null==urlParams.dark&&(mxSettings.settings.darkMode=N,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(N){if(Editor.darkMode!=N){var Y=this.editor.graph;Editor.darkMode=N;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";Y.view.gridColor=Editor.isDarkMode()?Y.view.defaultDarkGridColor:Y.view.defaultGridColor;Y.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";Y.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";Y.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";Y.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";Y.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";Y.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";Y.loadStylesheet();null!=this.actions.layersWindow&&(N=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,N&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=Y.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=Y.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=Y.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-Y.shapeForegroundColor;Graph.prototype.defaultThemeName=Y.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
+EditorUi.prototype.setDarkMode=function(Q){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(Q);null==urlParams.dark&&(mxSettings.settings.darkMode=Q,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(Q){if(Editor.darkMode!=Q){var X=this.editor.graph;Editor.darkMode=Q;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";X.view.gridColor=Editor.isDarkMode()?X.view.defaultDarkGridColor:X.view.defaultGridColor;X.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";X.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";X.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";X.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";X.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.loadStylesheet();null!=this.actions.layersWindow&&(Q=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,Q&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=X.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=X.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=X.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+X.shapeForegroundColor;Graph.prototype.defaultThemeName=X.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
@@ -3947,101 +3947,101 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(N,
-Y){null!=Y.shortcut&&900>n&&!mxClient.IS_IOS?N.firstChild.nextSibling.setAttribute("title",Y.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var N=this.userElement;N.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+N.style.display;N.className="geToolbarButton";N.innerText="";N.style.backgroundImage="url("+Editor.userImage+")";N.style.backgroundPosition="center center";
-N.style.backgroundRepeat="no-repeat";N.style.backgroundSize="24px 24px";N.style.height="24px";N.style.width="24px";N.style.cssFloat="right";N.setAttribute("title",mxResources.get("changeUser"));if("none"!=N.style.display){N.style.display="inline-block";var Y=this.getCurrentFile();if(null!=Y&&Y.isRealtimeEnabled()&&Y.isRealtimeSupported()){var ea=document.createElement("img");ea.setAttribute("border","0");ea.style.position="absolute";ea.style.left="18px";ea.style.top="2px";ea.style.width="12px";ea.style.height=
-"12px";var ka=Y.getRealtimeError();Y=Y.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==Y?(ea.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,ja=null!=ka&&null!=ka.message?ja+(" ("+ka.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ea.setAttribute("title",ja);N.style.paddingRight="4px";N.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
-this.shareButton){var N=this.shareButton;N.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";N.className="geToolbarButton";N.innerText="";N.style.backgroundImage="url("+Editor.shareImage+")";N.style.backgroundPosition="center center";N.style.backgroundRepeat="no-repeat";N.style.backgroundSize="24px 24px";N.style.height="24px";N.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var N=document.createElement("div");N.style.display="inline-block";N.style.position="relative";N.style.marginTop="6px";N.style.marginRight="4px";var Y=document.createElement("a");Y.className="geMenuItem gePrimaryBtn";Y.style.marginLeft="8px";Y.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ea="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(Y,ea);Y.setAttribute("title",ea);mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));N.appendChild(Y)}}else mxUtils.write(Y,mxResources.get("save")),Y.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),N.appendChild(Y),"1"==urlParams.saveAndExit&&(Y=document.createElement("a"),
-mxUtils.write(Y,mxResources.get("saveAndExit")),Y.setAttribute("title",mxResources.get("saveAndExit")),Y.className="geMenuItem",Y.style.marginLeft="6px",Y.style.padding="6px",mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),N.appendChild(Y));"1"!=urlParams.noExitBtn&&(Y=document.createElement("a"),ea="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(Y,ea),Y.setAttribute("title",ea),Y.className="geMenuItem",
-Y.style.marginLeft="6px",Y.style.padding="6px",mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),N.appendChild(Y));this.buttonContainer.appendChild(N);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(N,Y){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,N)){var ea=mxUtils.getOffset(this.editorUi.picker);
-ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=N.offsetTop-Y.height/2+16;return ea}var ka=F.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(N,Y,ea){var ka=this.editorUi.editor.graph;N.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(N.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(N,["-","lockUnlock"],null,
-ea)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(N,ka.isCellCollapsed(Y)?["expand"]:["collapse"],null,ea),this.addMenuItems(N,["collapsible","-","lockUnlock","enterGroup"],null,ea),N.addSeparator(),this.addSubmenu("layout",N)):ka.isSelectionEmpty()&&ka.isEnabled()?(N.addSeparator(),this.addMenuItems(N,["editData"],null,ea),N.addSeparator(),this.addSubmenu("layout",N),this.addSubmenu("insert",N),this.addMenuItems(N,["-","exitGroup"],null,ea)):ka.isEnabled()&&
-this.addMenuItems(N,["-","lockUnlock"],null,ea)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(N,Y,ea){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(N,["copyAsImage"],null,ea)};EditorUi.prototype.toggleFormatPanel=function(N){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=N?N:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(Q,
+X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?Q.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var Q=this.userElement;Q.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+Q.style.display;Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.userImage+")";Q.style.backgroundPosition="center center";
+Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";Q.style.cssFloat="right";Q.setAttribute("title",mxResources.get("changeUser"));if("none"!=Q.style.display){Q.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var fa=document.createElement("img");fa.setAttribute("border","0");fa.style.position="absolute";fa.style.left="18px";fa.style.top="2px";fa.style.width="12px";fa.style.height=
+"12px";var ka=X.getRealtimeError();X=X.getRealtimeState();var ia=mxResources.get("realtimeCollaboration");1==X?(fa.src=Editor.syncImage,ia+=" ("+mxResources.get("online")+")"):(fa.src=Editor.syncProblemImage,ia=null!=ka&&null!=ka.message?ia+(" ("+ka.message+")"):ia+(" ("+mxResources.get("disconnected")+")"));fa.setAttribute("title",ia);Q.style.paddingRight="4px";Q.appendChild(fa)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
+this.shareButton){var Q=this.shareButton;Q.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.shareImage+")";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var Q=document.createElement("div");Q.style.display="inline-block";Q.style.position="relative";Q.style.marginTop="6px";Q.style.marginRight="4px";var X=document.createElement("a");X.className="geMenuItem gePrimaryBtn";X.style.marginLeft="8px";X.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var fa="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(X,fa);X.setAttribute("title",fa);mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));Q.appendChild(X)}}else mxUtils.write(X,mxResources.get("save")),X.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),Q.appendChild(X),"1"==urlParams.saveAndExit&&(X=document.createElement("a"),
+mxUtils.write(X,mxResources.get("saveAndExit")),X.setAttribute("title",mxResources.get("saveAndExit")),X.className="geMenuItem",X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),Q.appendChild(X));"1"!=urlParams.noExitBtn&&(X=document.createElement("a"),fa="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(X,fa),X.setAttribute("title",fa),X.className="geMenuItem",
+X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),Q.appendChild(X));this.buttonContainer.appendChild(Q);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(Q,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,Q)){var fa=mxUtils.getOffset(this.editorUi.picker);
+fa.x+=this.editorUi.picker.offsetWidth+4;fa.y+=Q.offsetTop-X.height/2+16;return fa}var ka=F.apply(this,arguments);fa=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=fa.x-16;ka.y+=fa.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(Q,X,fa){var ka=this.editorUi.editor.graph;Q.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(Q.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(Q,["-","lockUnlock"],null,
+fa)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(Q,ka.isCellCollapsed(X)?["expand"]:["collapse"],null,fa),this.addMenuItems(Q,["collapsible","-","lockUnlock","enterGroup"],null,fa),Q.addSeparator(),this.addSubmenu("layout",Q)):ka.isSelectionEmpty()&&ka.isEnabled()?(Q.addSeparator(),this.addMenuItems(Q,["editData"],null,fa),Q.addSeparator(),this.addSubmenu("layout",Q),this.addSubmenu("insert",Q),this.addMenuItems(Q,["-","exitGroup"],null,fa)):ka.isEnabled()&&
+this.addMenuItems(Q,["-","lockUnlock"],null,fa)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(Q,X,fa){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(Q,["copyAsImage"],null,fa)};EditorUi.prototype.toggleFormatPanel=function(Q){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=Q?Q:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),
-this.menus.findReplaceWindow=null);G.apply(this,arguments)};var aa=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(N){aa.apply(this,arguments);if(N){var Y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=Y&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=Y||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ca=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(N){N=ca.apply(this,arguments);var Y=this.editorUi,ea=Y.editor.graph;if(ea.isEnabled()&&"1"==urlParams.sketch){var ka=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,V){Y.setSketchMode(!Editor.sketchMode);null!=V&&mxEvent.isShiftDown(V)||ea.updateCellStyles({sketch:ja?
-"1":null},ea.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};Y.addListener("sketchModeChanged",this.listener)},destroy:function(){Y.removeListener(this.listener)}});N.appendChild(ka)}return N};var ba=Menus.prototype.init;Menus.prototype.init=function(){ba.apply(this,arguments);var N=this.editorUi,Y=N.editor.graph;N.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";N.actions.get("createShape").label=mxResources.get("shape")+"...";N.actions.get("outline").label=
-mxResources.get("outline")+"...";N.actions.get("layers").label=mxResources.get("layers")+"...";N.actions.get("tags").label=mxResources.get("tags")+"...";N.actions.get("comments").label=mxResources.get("comments")+"...";var ea=N.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(S){N.setDarkMode(!Editor.darkMode)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.isDarkMode()});ea=N.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(S){N.setSketchMode(!Editor.sketchMode)}));
-ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.sketchMode});ea=N.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(S){N.setPagesVisible(!Editor.pagesVisible)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.pagesVisible});N.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){Y.popupMenuHandler.hideMenu();N.showImportCsvDialog()}));N.actions.put("importText",new Action(mxResources.get("text")+"...",
-function(){var S=new ParseDialog(N,"Insert from Text");N.showDialog(S.container,620,420,!0,!1);S.init()}));N.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var S=new ParseDialog(N,"Insert from Text","formatSql");N.showDialog(S.container,620,420,!0,!1);S.init()}));N.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(N)},null,null,Editor.ctrlKey+"+Shift+K"));N.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(N)})).shortcut=N.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!N.isOffline()&&N.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var S=new ParseDialog(N,mxResources.get("plantUml")+"...","plantUml");N.showDialog(S.container,620,420,!0,!1);S.init()}));N.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var S=new ParseDialog(N,mxResources.get("mermaid")+"...","mermaid");N.showDialog(S.container,620,420,!0,!1);
-S.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(S,ha){var la=this.editorUi.editor.graph,u=la.getSelectionCell();ka.call(this,S,u,null,ha);this.addMenuItems(S,["editTooltip"],ha);la.model.isVertex(u)&&this.addMenuItems(S,["editGeometry"],ha);this.addMenuItems(S,["-","edit"],ha)})));this.addPopupMenuCellEditItems=function(S,ha,la,u){S.addSeparator();this.addSubmenu("editCell",S,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
-function(S,ha){var la=N.getCurrentFile();N.menus.addMenuItems(S,["new"],ha);N.menus.addSubmenu("openFrom",S,ha);isLocalStorage&&this.addSubmenu("openRecent",S,ha);S.addSeparator(ha);null!=la&&la.constructor==DriveFile?N.menus.addMenuItems(S,["save","rename","makeCopy","moveToFolder"],ha):(N.menus.addMenuItems(S,["save","saveAs","-","rename"],ha),N.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],ha):N.menus.addMenuItems(S,["makeCopy"],
-ha));S.addSeparator(ha);null!=la&&(la.isRevisionHistorySupported()&&N.menus.addMenuItems(S,["revisionHistory"],ha),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||N.menus.addMenuItems(S,["synchronize"],ha));N.menus.addMenuItems(S,["autosave"],ha);if(null!=la&&(S.addSeparator(ha),la.constructor==DriveFile&&N.menus.addMenuItems(S,["share"],ha),null!=N.fileNode&&"1"!=urlParams.embedInline)){var u=null!=la.getTitle()?la.getTitle():N.defaultFilename;(la.constructor==
-DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(S,["-","properties"],ha)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(S,ha){var la=N.getCurrentFile();N.menus.addSubmenu("extras",S,ha,mxResources.get("preferences"));S.addSeparator(ha);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)N.menus.addMenuItems(S,"new open - synchronize - save saveAs -".split(" "),ha);else if("1"==urlParams.embed||N.mode==App.MODE_ATLAS){"1"!=
-urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&N.menus.addMenuItems(S,["-","save"],ha);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||N.mode==App.MODE_ATLAS)N.menus.addMenuItems(S,["saveAndExit"],ha),null!=la&&la.isRevisionHistorySupported()&&N.menus.addMenuItems(S,["revisionHistory"],ha);S.addSeparator(ha)}else N.mode==App.MODE_ATLAS?N.menus.addMenuItems(S,["save","synchronize","-"],ha):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(N.menus.addMenuItems(S,
-["new"],ha),N.menus.addSubmenu("openFrom",S,ha),isLocalStorage&&this.addSubmenu("openRecent",S,ha),S.addSeparator(ha),null!=la&&(la.constructor==DriveFile&&N.menus.addMenuItems(S,["share"],ha),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||N.menus.addMenuItems(S,["synchronize"],ha)),S.addSeparator(ha),N.menus.addSubmenu("save",S,ha)):N.menus.addSubmenu("file",S,ha));N.menus.addSubmenu("exportAs",S,ha);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?N.menus.addMenuItems(S,
-["import"],ha):"1"!=urlParams.noFileMenu&&N.menus.addSubmenu("importFrom",S,ha);N.commentsSupported()&&N.menus.addMenuItems(S,["-","comments"],ha);N.menus.addMenuItems(S,"- findReplace outline layers tags - pageSetup".split(" "),ha);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||N.menus.addMenuItems(S,["print"],ha);"1"!=urlParams.sketch&&null!=la&&null!=N.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():N.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||
-this.addMenuItems(S,["-","properties"]));S.addSeparator(ha);N.menus.addSubmenu("help",S,ha);"1"==urlParams.embed||N.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||N.mode==App.MODE_ATLAS)&&N.menus.addMenuItems(S,["-","exit"],ha):"1"!=urlParams.noFileMenu&&N.menus.addMenuItems(S,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(S,ha){var la=N.getCurrentFile();null!=la&&la.constructor==DriveFile?N.menus.addMenuItems(S,["save","makeCopy","-","rename","moveToFolder"],ha):(N.menus.addMenuItems(S,
-["save","saveAs","-","rename"],ha),N.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],ha):N.menus.addMenuItems(S,["makeCopy"],ha));N.menus.addMenuItems(S,["-","autosave"],ha);null!=la&&la.isRevisionHistorySupported()&&N.menus.addMenuItems(S,["-","revisionHistory"],ha)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(S,ha){ja.funct(S,ha);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||N.menus.addMenuItems(S,
-["publishLink"],ha);N.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(S.addSeparator(ha),N.menus.addSubmenu("embed",S,ha))})));var V=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(S,ha){N.menus.addInsertTableCellItem(S,ha)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(S,ha){J.funct(S,ha);this.addMenuItems(S,["-","pageScale","-","ruler"],ha)})))}this.put("extras",new Menu(mxUtils.bind(this,function(S,ha){null!=V&&
-N.menus.addSubmenu("language",S,ha);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&N.mode!=App.MODE_ATLAS&&N.menus.addSubmenu("theme",S,ha);N.menus.addSubmenu("units",S,ha);S.addSeparator(ha);"1"!=urlParams.sketch&&N.menus.addMenuItems(S,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),ha);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&N.mode!=App.MODE_ATLAS&&N.menus.addMenuItems(S,["-","showStartScreen",
-"search","scratchpad"],ha);S.addSeparator(ha);"1"==urlParams.sketch?N.menus.addMenuItems(S,"configuration - copyConnect collapseExpand tooltips -".split(" "),ha):(N.mode!=App.MODE_ATLAS&&N.menus.addMenuItem(S,"configuration",ha),!N.isOfflineApp()&&isLocalStorage&&N.mode!=App.MODE_ATLAS&&N.menus.addMenuItem(S,"plugins",ha));EditorUi.isElectronApp&&N.menus.addMenuItems(S,["-","spellCheck","autoBkp","drafts","-"],ha);var la=N.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&
-this.addMenuItems(S,["-","showRemoteCursors","shareCursor","-"],ha);S.addSeparator(ha);N.mode!=App.MODE_ATLAS&&this.addMenuItems(S,["fullscreen"],ha);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(S,["toggleDarkMode"],ha);S.addSeparator(ha)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(S,ha){N.menus.addMenuItems(S,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ha)})));mxUtils.bind(this,
-function(){var S=this.get("insert"),ha=S.funct;S.funct=function(la,u){"1"==urlParams.sketch?(N.insertTemplateEnabled&&!N.isOffline()&&N.menus.addMenuItems(la,["insertTemplate"],u),N.menus.addMenuItems(la,["insertImage","insertLink","-"],u),N.menus.addSubmenu("insertAdvanced",la,u,mxResources.get("advanced")),N.menus.addSubmenu("layout",la,u)):(ha.apply(this,arguments),N.menus.addSubmenu("table",la,u))}})();var W="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-Q=function(S,ha,la,u){S.addItem(la,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(N,la,u);N.showDialog(H.container,620,420,!0,!1);H.init()}),ha)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(S,ha){for(var la=0;la<W.length;la++)"-"==W[la]?S.addSeparator(ha):Q(S,ha,mxResources.get(W[la])+"...",W[la])})))};EditorUi.prototype.installFormatToolbar=function(N){var Y=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-Y.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<Y.getSelectionCount()?(N.appendChild(ea),ea.innerHTML="Selected: "+Y.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Z=!1;EditorUi.prototype.initFormatWindow=function(){if(!Z&&null!=this.formatWindow){Z=!0;this.formatWindow.window.setClosable(!1);var N=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){N.apply(this,arguments);this.minimized?
-(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(Y){mxEvent.getSource(Y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function N(va,ya,Na){var Ja=V.menus.get(va),Pa=S.addMenu(mxResources.get(va),mxUtils.bind(this,function(){Ja.funct.apply(this,arguments)}),Q);Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.top="6px";Pa.style.marginRight="6px";Pa.style.height="30px";Pa.style.paddingTop="6px";Pa.style.paddingBottom="6px";Pa.style.cursor="pointer";Pa.setAttribute("title",mxResources.get(va));V.menus.menuCreated(Ja,
-Pa,"geMenuItem");null!=Na?(Pa.style.backgroundImage="url("+Na+")",Pa.style.backgroundPosition="center center",Pa.style.backgroundRepeat="no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px",Pa.innerText=""):ya||(Pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Pa.style.backgroundPosition="right 6px center",Pa.style.backgroundRepeat="no-repeat",Pa.style.paddingRight="22px");return Pa}function Y(va,ya,Na,Ja,Pa,Ya){var cb=document.createElement("a");cb.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";cb.style.display="inline-block";cb.style.boxSizing="border-box";cb.style.height="30px";cb.style.padding="6px";cb.style.position="relative";cb.style.verticalAlign="top";cb.style.top="0px";"1"==urlParams.sketch&&(cb.style.borderStyle="none",cb.style.boxShadow="none",cb.style.padding="6px",cb.style.margin="0px");null!=V.statusContainer?W.insertBefore(cb,V.statusContainer):W.appendChild(cb);null!=Ya?(cb.style.backgroundImage="url("+Ya+")",cb.style.backgroundPosition=
-"center center",cb.style.backgroundRepeat="no-repeat",cb.style.backgroundSize="24px 24px",cb.style.width="34px"):mxUtils.write(cb,va);mxEvent.addListener(cb,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(cb,"click",function(fb){"disabled"!=cb.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(cb.style.marginRight="4px");null!=Ja&&cb.setAttribute("title",Ja);null!=Pa&&(va=function(){Pa.isEnabled()?(cb.removeAttribute("disabled"),
-cb.style.cursor="pointer"):(cb.setAttribute("disabled","disabled"),cb.style.cursor="default")},Pa.addListener("stateChanged",va),J.addListener("enabledChanged",va),va());return cb}function ea(va,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none");
-for(var Ja=0;Ja<va.length;Ja++)null!=va[Ja]&&("1"==urlParams.sketch&&(va[Ja].style.padding="10px 8px",va[Ja].style.width="30px"),va[Ja].style.margin="0px",va[Ja].style.boxShadow="none",Na.appendChild(va[Ja]));null!=ya&&mxUtils.setOpacity(Na,ya);null!=V.statusContainer&&"1"!=urlParams.sketch?W.insertBefore(Na,V.statusContainer):W.appendChild(Na);return Na}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(da.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var va=
-W.firstChild;null!=va;){var ya=va.nextSibling;"geMenuItem"!=va.className&&"geItem"!=va.className||va.parentNode.removeChild(va);va=ya}Q=W.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;va=1E3>n||"1"==urlParams.sketch;var Na=null;va||(Na=N("diagram"));ya=va?N("diagram",null,Editor.drawLogoImage):null;null!=ya&&(Na=ya);ea([Na,Y(mxResources.get("shapes"),V.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),V.actions.get("image"),va?Editor.shapesImage:
-null),Y(mxResources.get("format"),V.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+V.actions.get("formatPanel").shortcut+")",V.actions.get("image"),va?Editor.formatImage:null)],va?60:null);ya=N("insert",!0,va?O:null);ea([ya,Y(mxResources.get("delete"),V.actions.get("delete").funct,null,mxResources.get("delete"),V.actions.get("delete"),va?Editor.trashImage:null)],va?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([za,640<=n?Y("",Sa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Sa,Editor.zoomInImage):null,640<=n?Y("",$a.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",$a,Editor.zoomOutImage):null],60))}null!=Na&&(mxEvent.disableContextMenu(Na),mxEvent.addGestureListeners(Na,mxUtils.bind(this,function(Ja){(mxEvent.isShiftDown(Ja)||mxEvent.isAltDown(Ja)||mxEvent.isMetaDown(Ja)||mxEvent.isControlDown(Ja)||mxEvent.isPopupTrigger(Ja))&&V.appIconClicked(Ja)}),null,null));ya=V.menus.get("language");null!=ya&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-n&&"1"!=urlParams.sketch?(null==Ma&&(ya=S.addMenu("",ya.funct),ya.setAttribute("title",mxResources.get("language")),ya.className="geToolbarButton",ya.style.backgroundImage="url("+Editor.globeImage+")",ya.style.backgroundPosition="center center",ya.style.backgroundRepeat="no-repeat",ya.style.backgroundSize="24px 24px",ya.style.position="absolute",ya.style.height="24px",ya.style.width="24px",ya.style.zIndex="1",ya.style.right="8px",ya.style.cursor="pointer",ya.style.top="1"==urlParams.embed?"12px":
-"11px",W.appendChild(ya),Ma=ya),V.buttonContainer.style.paddingRight="34px"):(V.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}qa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
-"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
+this.menus.findReplaceWindow=null);G.apply(this,arguments)};var Z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(Q){Z.apply(this,arguments);if(Q){var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=X&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=X||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ca=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(Q){Q=ca.apply(this,arguments);var X=this.editorUi,fa=X.editor.graph;if(fa.isEnabled()&&"1"==urlParams.sketch){var ka=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ia,V){X.setSketchMode(!Editor.sketchMode);null!=V&&mxEvent.isShiftDown(V)||fa.updateCellStyles({sketch:ia?
+"1":null},fa.getVerticesAndEdges())},{install:function(ia){this.listener=function(){ia(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}});Q.appendChild(ka)}return Q};var aa=Menus.prototype.init;Menus.prototype.init=function(){aa.apply(this,arguments);var Q=this.editorUi,X=Q.editor.graph;Q.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";Q.actions.get("createShape").label=mxResources.get("shape")+"...";Q.actions.get("outline").label=
+mxResources.get("outline")+"...";Q.actions.get("layers").label=mxResources.get("layers")+"...";Q.actions.get("tags").label=mxResources.get("tags")+"...";Q.actions.get("comments").label=mxResources.get("comments")+"...";var fa=Q.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(N){Q.setDarkMode(!Editor.darkMode)}));fa.setToggleAction(!0);fa.setSelectedCallback(function(){return Editor.isDarkMode()});fa=Q.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(N){Q.setSketchMode(!Editor.sketchMode)}));
+fa.setToggleAction(!0);fa.setSelectedCallback(function(){return Editor.sketchMode});fa=Q.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(N){Q.setPagesVisible(!Editor.pagesVisible)}));fa.setToggleAction(!0);fa.setSelectedCallback(function(){return Editor.pagesVisible});Q.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();Q.showImportCsvDialog()}));Q.actions.put("importText",new Action(mxResources.get("text")+"...",
+function(){var N=new ParseDialog(Q,"Insert from Text");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var N=new ParseDialog(Q,"Insert from Text","formatSql");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(Q)},null,null,Editor.ctrlKey+"+Shift+K"));Q.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(Q)})).shortcut=Q.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!Q.isOffline()&&Q.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var N=new ParseDialog(Q,mxResources.get("plantUml")+"...","plantUml");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var N=new ParseDialog(Q,mxResources.get("mermaid")+"...","mermaid");Q.showDialog(N.container,620,420,!0,!1);
+N.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(N,ba){var la=this.editorUi.editor.graph,u=la.getSelectionCell();ka.call(this,N,u,null,ba);this.addMenuItems(N,["editTooltip"],ba);la.model.isVertex(u)&&this.addMenuItems(N,["editGeometry"],ba);this.addMenuItems(N,["-","edit"],ba)})));this.addPopupMenuCellEditItems=function(N,ba,la,u){N.addSeparator();this.addSubmenu("editCell",N,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
+function(N,ba){var la=Q.getCurrentFile();Q.menus.addMenuItems(N,["new"],ba);Q.menus.addSubmenu("openFrom",N,ba);isLocalStorage&&this.addSubmenu("openRecent",N,ba);N.addSeparator(ba);null!=la&&la.constructor==DriveFile?Q.menus.addMenuItems(N,["save","rename","makeCopy","moveToFolder"],ba):(Q.menus.addMenuItems(N,["save","saveAs","-","rename"],ba),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(N,["upload"],ba):Q.menus.addMenuItems(N,["makeCopy"],
+ba));N.addSeparator(ba);null!=la&&(la.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["revisionHistory"],ba),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||Q.menus.addMenuItems(N,["synchronize"],ba));Q.menus.addMenuItems(N,["autosave"],ba);if(null!=la&&(N.addSeparator(ba),la.constructor==DriveFile&&Q.menus.addMenuItems(N,["share"],ba),null!=Q.fileNode&&"1"!=urlParams.embedInline)){var u=null!=la.getTitle()?la.getTitle():Q.defaultFilename;(la.constructor==
+DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(N,["-","properties"],ba)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(N,ba){var la=Q.getCurrentFile();Q.menus.addSubmenu("extras",N,ba,mxResources.get("preferences"));N.addSeparator(ba);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)Q.menus.addMenuItems(N,"new open - synchronize - save saveAs -".split(" "),ba);else if("1"==urlParams.embed||Q.mode==App.MODE_ATLAS){"1"!=
+urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&Q.menus.addMenuItems(N,["-","save"],ba);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||Q.mode==App.MODE_ATLAS)Q.menus.addMenuItems(N,["saveAndExit"],ba),null!=la&&la.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["revisionHistory"],ba);N.addSeparator(ba)}else Q.mode==App.MODE_ATLAS?Q.menus.addMenuItems(N,["save","synchronize","-"],ba):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(Q.menus.addMenuItems(N,
+["new"],ba),Q.menus.addSubmenu("openFrom",N,ba),isLocalStorage&&this.addSubmenu("openRecent",N,ba),N.addSeparator(ba),null!=la&&(la.constructor==DriveFile&&Q.menus.addMenuItems(N,["share"],ba),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||Q.menus.addMenuItems(N,["synchronize"],ba)),N.addSeparator(ba),Q.menus.addSubmenu("save",N,ba)):Q.menus.addSubmenu("file",N,ba));Q.menus.addSubmenu("exportAs",N,ba);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?Q.menus.addMenuItems(N,
+["import"],ba):"1"!=urlParams.noFileMenu&&Q.menus.addSubmenu("importFrom",N,ba);Q.commentsSupported()&&Q.menus.addMenuItems(N,["-","comments"],ba);Q.menus.addMenuItems(N,"- findReplace outline layers tags - pageSetup".split(" "),ba);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||Q.menus.addMenuItems(N,["print"],ba);"1"!=urlParams.sketch&&null!=la&&null!=Q.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():Q.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||
+this.addMenuItems(N,["-","properties"]));N.addSeparator(ba);Q.menus.addSubmenu("help",N,ba);"1"==urlParams.embed||Q.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||Q.mode==App.MODE_ATLAS)&&Q.menus.addMenuItems(N,["-","exit"],ba):"1"!=urlParams.noFileMenu&&Q.menus.addMenuItems(N,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(N,ba){var la=Q.getCurrentFile();null!=la&&la.constructor==DriveFile?Q.menus.addMenuItems(N,["save","makeCopy","-","rename","moveToFolder"],ba):(Q.menus.addMenuItems(N,
+["save","saveAs","-","rename"],ba),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(N,["upload"],ba):Q.menus.addMenuItems(N,["makeCopy"],ba));Q.menus.addMenuItems(N,["-","autosave"],ba);null!=la&&la.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["-","revisionHistory"],ba)})));var ia=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(N,ba){ia.funct(N,ba);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||Q.menus.addMenuItems(N,
+["publishLink"],ba);Q.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(N.addSeparator(ba),Q.menus.addSubmenu("embed",N,ba))})));var V=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(N,ba){Q.menus.addInsertTableCellItem(N,ba)})));if("1"==urlParams.sketch){var L=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(N,ba){L.funct(N,ba);this.addMenuItems(N,["-","pageScale","-","ruler"],ba)})))}this.put("extras",new Menu(mxUtils.bind(this,function(N,ba){null!=V&&
+Q.menus.addSubmenu("language",N,ba);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&Q.mode!=App.MODE_ATLAS&&Q.menus.addSubmenu("theme",N,ba);Q.menus.addSubmenu("units",N,ba);N.addSeparator(ba);"1"!=urlParams.sketch&&Q.menus.addMenuItems(N,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),ba);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItems(N,["-","showStartScreen",
+"search","scratchpad"],ba);N.addSeparator(ba);"1"==urlParams.sketch?Q.menus.addMenuItems(N,"configuration - copyConnect collapseExpand tooltips -".split(" "),ba):(Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(N,"configuration",ba),!Q.isOfflineApp()&&isLocalStorage&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(N,"plugins",ba));EditorUi.isElectronApp&&Q.menus.addMenuItems(N,["-","spellCheck","autoBkp","drafts","-"],ba);var la=Q.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&
+this.addMenuItems(N,["-","showRemoteCursors","shareCursor","-"],ba);N.addSeparator(ba);Q.mode!=App.MODE_ATLAS&&this.addMenuItems(N,["fullscreen"],ba);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(N,["toggleDarkMode"],ba);N.addSeparator(ba)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(N,ba){Q.menus.addMenuItems(N,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ba)})));mxUtils.bind(this,
+function(){var N=this.get("insert"),ba=N.funct;N.funct=function(la,u){"1"==urlParams.sketch?(Q.insertTemplateEnabled&&!Q.isOffline()&&Q.menus.addMenuItems(la,["insertTemplate"],u),Q.menus.addMenuItems(la,["insertImage","insertLink","-"],u),Q.menus.addSubmenu("insertAdvanced",la,u,mxResources.get("advanced")),Q.menus.addSubmenu("layout",la,u)):(ba.apply(this,arguments),Q.menus.addSubmenu("table",la,u))}})();var ea="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+O=function(N,ba,la,u){N.addItem(la,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(Q,la,u);Q.showDialog(H.container,620,420,!0,!1);H.init()}),ba)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(N,ba){for(var la=0;la<ea.length;la++)"-"==ea[la]?N.addSeparator(ba):O(N,ba,mxResources.get(ea[la])+"...",ea[la])})))};EditorUi.prototype.installFormatToolbar=function(Q){var X=this.editor.graph,fa=document.createElement("div");fa.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ia){0<X.getSelectionCount()?(Q.appendChild(fa),fa.innerHTML="Selected: "+X.getSelectionCount()):null!=fa.parentNode&&fa.parentNode.removeChild(fa)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var Q=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){Q.apply(this,arguments);this.minimized?
+(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function Q(va,ya,Na){var Ja=V.menus.get(va),Qa=N.addMenu(mxResources.get(va),mxUtils.bind(this,function(){Ja.funct.apply(this,arguments)}),O);Qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Qa.style.display="inline-block";Qa.style.boxSizing="border-box";Qa.style.top="6px";Qa.style.marginRight="6px";Qa.style.height="30px";Qa.style.paddingTop="6px";Qa.style.paddingBottom="6px";Qa.style.cursor="pointer";Qa.setAttribute("title",mxResources.get(va));V.menus.menuCreated(Ja,
+Qa,"geMenuItem");null!=Na?(Qa.style.backgroundImage="url("+Na+")",Qa.style.backgroundPosition="center center",Qa.style.backgroundRepeat="no-repeat",Qa.style.backgroundSize="24px 24px",Qa.style.width="34px",Qa.innerText=""):ya||(Qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Qa.style.backgroundPosition="right 6px center",Qa.style.backgroundRepeat="no-repeat",Qa.style.paddingRight="22px");return Qa}function X(va,ya,Na,Ja,Qa,Za){var cb=document.createElement("a");cb.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";cb.style.display="inline-block";cb.style.boxSizing="border-box";cb.style.height="30px";cb.style.padding="6px";cb.style.position="relative";cb.style.verticalAlign="top";cb.style.top="0px";"1"==urlParams.sketch&&(cb.style.borderStyle="none",cb.style.boxShadow="none",cb.style.padding="6px",cb.style.margin="0px");null!=V.statusContainer?ea.insertBefore(cb,V.statusContainer):ea.appendChild(cb);null!=Za?(cb.style.backgroundImage="url("+Za+")",cb.style.backgroundPosition=
+"center center",cb.style.backgroundRepeat="no-repeat",cb.style.backgroundSize="24px 24px",cb.style.width="34px"):mxUtils.write(cb,va);mxEvent.addListener(cb,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(cb,"click",function(fb){"disabled"!=cb.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(cb.style.marginRight="4px");null!=Ja&&cb.setAttribute("title",Ja);null!=Qa&&(va=function(){Qa.isEnabled()?(cb.removeAttribute("disabled"),
+cb.style.cursor="pointer"):(cb.setAttribute("disabled","disabled"),cb.style.cursor="default")},Qa.addListener("stateChanged",va),L.addListener("enabledChanged",va),va());return cb}function fa(va,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none");
+for(var Ja=0;Ja<va.length;Ja++)null!=va[Ja]&&("1"==urlParams.sketch&&(va[Ja].style.padding="10px 8px",va[Ja].style.width="30px"),va[Ja].style.margin="0px",va[Ja].style.boxShadow="none",Na.appendChild(va[Ja]));null!=ya&&mxUtils.setOpacity(Na,ya);null!=V.statusContainer&&"1"!=urlParams.sketch?ea.insertBefore(Na,V.statusContainer):ea.appendChild(Na);return Na}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(da.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var va=
+ea.firstChild;null!=va;){var ya=va.nextSibling;"geMenuItem"!=va.className&&"geItem"!=va.className||va.parentNode.removeChild(va);va=ya}O=ea.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;va=1E3>n||"1"==urlParams.sketch;var Na=null;va||(Na=Q("diagram"));ya=va?Q("diagram",null,Editor.drawLogoImage):null;null!=ya&&(Na=ya);fa([Na,X(mxResources.get("shapes"),V.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),V.actions.get("image"),va?Editor.shapesImage:
+null),X(mxResources.get("format"),V.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+V.actions.get("formatPanel").shortcut+")",V.actions.get("image"),va?Editor.formatImage:null)],va?60:null);ya=Q("insert",!0,va?P:null);fa([ya,X(mxResources.get("delete"),V.actions.get("delete").funct,null,mxResources.get("delete"),V.actions.get("delete"),va?Editor.trashImage:null)],va?60:null);411<=n&&(fa([z,K],60),520<=n&&fa([za,640<=n?X("",Oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",Oa,Editor.zoomInImage):null,640<=n?X("",Xa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Xa,Editor.zoomOutImage):null],60))}null!=Na&&(mxEvent.disableContextMenu(Na),mxEvent.addGestureListeners(Na,mxUtils.bind(this,function(Ja){(mxEvent.isShiftDown(Ja)||mxEvent.isAltDown(Ja)||mxEvent.isMetaDown(Ja)||mxEvent.isControlDown(Ja)||mxEvent.isPopupTrigger(Ja))&&V.appIconClicked(Ja)}),null,null));ya=V.menus.get("language");null!=ya&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+n&&"1"!=urlParams.sketch?(null==Ma&&(ya=N.addMenu("",ya.funct),ya.setAttribute("title",mxResources.get("language")),ya.className="geToolbarButton",ya.style.backgroundImage="url("+Editor.globeImage+")",ya.style.backgroundPosition="center center",ya.style.backgroundRepeat="no-repeat",ya.style.backgroundSize="24px 24px",ya.style.position="absolute",ya.style.height="24px",ya.style.width="24px",ya.style.zIndex="1",ya.style.right="8px",ya.style.cursor="pointer",ya.style.top="1"==urlParams.embed?"12px":
+"11px",ea.appendChild(ya),Ma=ya),V.buttonContainer.style.paddingRight="34px"):(V.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}qa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ia=document.createElement("div");ia.style.cssText=
+"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ia.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ia);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var V=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==V.embedViewport)mxUtils.fit(this.div);else{var va=parseInt(this.div.offsetLeft),ya=parseInt(this.div.offsetWidth),Na=V.embedViewport.x+
-V.embedViewport.width,Ja=parseInt(this.div.offsetTop),Pa=parseInt(this.div.offsetHeight),Ya=V.embedViewport.y+V.embedViewport.height;this.div.style.left=Math.max(V.embedViewport.x,Math.min(va,Na-ya))+"px";this.div.style.top=Math.max(V.embedViewport.y,Math.min(Ja,Ya-Pa))+"px";this.div.style.height=Math.min(V.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(V.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
-!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));V=this;var J=V.editor.graph;V.toolbar=this.createToolbar(V.createDiv("geToolbar"));V.defaultLibraryName=
-mxResources.get("untitledLibrary");var W=document.createElement("div");W.className="geMenubarContainer";var Q=null,S=new Menubar(V,W);V.statusContainer=V.createStatusContainer();V.statusContainer.style.position="relative";V.statusContainer.style.maxWidth="";V.statusContainer.style.marginTop="7px";V.statusContainer.style.marginLeft="6px";V.statusContainer.style.color="gray";V.statusContainer.style.cursor="default";var ha=V.hideCurrentMenu;V.hideCurrentMenu=function(){ha.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var la=V.descriptorChanged;V.descriptorChanged=function(){la.apply(this,arguments);var va=V.getCurrentFile();if(null!=va&&null!=va.getTitle()){var ya=va.getMode();"google"==ya?ya="googleDrive":"github"==ya?ya="gitHub":"gitlab"==ya?ya="gitLab":"onedrive"==ya&&(ya="oneDrive");ya=mxResources.get(ya);W.setAttribute("title",va.getTitle()+(null!=ya?" ("+ya+")":""))}else W.removeAttribute("title")};V.setStatusText(V.editor.getStatus());W.appendChild(V.statusContainer);V.buttonContainer=document.createElement("div");
-V.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";W.appendChild(V.buttonContainer);V.menubarContainer=V.buttonContainer;V.tabContainer=document.createElement("div");V.tabContainer.className="geTabContainer";V.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=V.diagramContainer.parentNode;var u=document.createElement("div");
+V.embedViewport.width,Ja=parseInt(this.div.offsetTop),Qa=parseInt(this.div.offsetHeight),Za=V.embedViewport.y+V.embedViewport.height;this.div.style.left=Math.max(V.embedViewport.x,Math.min(va,Na-ya))+"px";this.div.style.top=Math.max(V.embedViewport.y,Math.min(Ja,Za-Qa))+"px";this.div.style.height=Math.min(V.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(V.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
+!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ia=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ia)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));V=this;var L=V.editor.graph;V.toolbar=this.createToolbar(V.createDiv("geToolbar"));V.defaultLibraryName=
+mxResources.get("untitledLibrary");var ea=document.createElement("div");ea.className="geMenubarContainer";var O=null,N=new Menubar(V,ea);V.statusContainer=V.createStatusContainer();V.statusContainer.style.position="relative";V.statusContainer.style.maxWidth="";V.statusContainer.style.marginTop="7px";V.statusContainer.style.marginLeft="6px";V.statusContainer.style.color="gray";V.statusContainer.style.cursor="default";var ba=V.hideCurrentMenu;V.hideCurrentMenu=function(){ba.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
+var la=V.descriptorChanged;V.descriptorChanged=function(){la.apply(this,arguments);var va=V.getCurrentFile();if(null!=va&&null!=va.getTitle()){var ya=va.getMode();"google"==ya?ya="googleDrive":"github"==ya?ya="gitHub":"gitlab"==ya?ya="gitLab":"onedrive"==ya&&(ya="oneDrive");ya=mxResources.get(ya);ea.setAttribute("title",va.getTitle()+(null!=ya?" ("+ya+")":""))}else ea.removeAttribute("title")};V.setStatusText(V.editor.getStatus());ea.appendChild(V.statusContainer);V.buttonContainer=document.createElement("div");
+V.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";ea.appendChild(V.buttonContainer);V.menubarContainer=V.buttonContainer;V.tabContainer=document.createElement("div");V.tabContainer.className="geTabContainer";V.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ia=V.diagramContainer.parentNode;var u=document.createElement("div");
u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";V.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){u.style.top="20px";V.titlebar=document.createElement("div");V.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var H=document.createElement("div");H.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
-V.titlebar.appendChild(H);ja.appendChild(V.titlebar)}H=V.menus.get("viewZoom");var O="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,da="1"==urlParams.sketch?document.createElement("div"):null,P=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();J.refresh();J.view.validateBackground()});V.addListener("darkModeChanged",P);V.addListener("sketchModeChanged",
-P);var ma=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)da.style.left="10px",da.style.top="10px",R.style.left="10px",R.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",V.diagramContainer.setAttribute("data-bounds",V.diagramContainer.style.top+" "+V.diagramContainer.style.left+" "+V.diagramContainer.style.width+" "+V.diagramContainer.style.height),V.diagramContainer.style.top="0px",V.diagramContainer.style.left="0px",V.diagramContainer.style.bottom="0px",V.diagramContainer.style.right=
-"0px",V.diagramContainer.style.width="",V.diagramContainer.style.height="";else{var va=V.diagramContainer.getAttribute("data-bounds");if(null!=va){V.diagramContainer.style.background="transparent";V.diagramContainer.removeAttribute("data-bounds");var ya=J.getGraphBounds();va=va.split(" ");V.diagramContainer.style.top=va[0];V.diagramContainer.style.left=va[1];V.diagramContainer.style.width=ya.width+50+"px";V.diagramContainer.style.height=ya.height+46+"px";V.diagramContainer.style.bottom="";V.diagramContainer.style.right=
-"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:V.diagramContainer.getBoundingClientRect()}),"*");V.refresh()}da.style.left=V.diagramContainer.offsetLeft+"px";da.style.top=V.diagramContainer.offsetTop-da.offsetHeight-4+"px";R.style.display="";R.style.left=V.diagramContainer.offsetLeft-R.offsetWidth-4+"px";R.style.top=V.diagramContainer.offsetTop+"px";T.style.left=V.diagramContainer.offsetLeft+V.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=da.style.top;
+V.titlebar.appendChild(H);ia.appendChild(V.titlebar)}H=V.menus.get("viewZoom");var P="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,T="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,da="1"==urlParams.sketch?document.createElement("div"):null,R=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();L.refresh();L.view.validateBackground()});V.addListener("darkModeChanged",R);V.addListener("sketchModeChanged",
+R);var ma=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)da.style.left="10px",da.style.top="10px",S.style.left="10px",S.style.top="60px",T.style.top="10px",T.style.right="12px",T.style.left="",V.diagramContainer.setAttribute("data-bounds",V.diagramContainer.style.top+" "+V.diagramContainer.style.left+" "+V.diagramContainer.style.width+" "+V.diagramContainer.style.height),V.diagramContainer.style.top="0px",V.diagramContainer.style.left="0px",V.diagramContainer.style.bottom="0px",V.diagramContainer.style.right=
+"0px",V.diagramContainer.style.width="",V.diagramContainer.style.height="";else{var va=V.diagramContainer.getAttribute("data-bounds");if(null!=va){V.diagramContainer.style.background="transparent";V.diagramContainer.removeAttribute("data-bounds");var ya=L.getGraphBounds();va=va.split(" ");V.diagramContainer.style.top=va[0];V.diagramContainer.style.left=va[1];V.diagramContainer.style.width=ya.width+50+"px";V.diagramContainer.style.height=ya.height+46+"px";V.diagramContainer.style.bottom="";V.diagramContainer.style.right=
+"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:V.diagramContainer.getBoundingClientRect()}),"*");V.refresh()}da.style.left=V.diagramContainer.offsetLeft+"px";da.style.top=V.diagramContainer.offsetTop-da.offsetHeight-4+"px";S.style.display="";S.style.left=V.diagramContainer.offsetLeft-S.offsetWidth-4+"px";S.style.top=V.diagramContainer.offsetTop+"px";T.style.left=V.diagramContainer.offsetLeft+V.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=da.style.top;
T.style.right="";V.bottomResizer.style.left=V.diagramContainer.offsetLeft+(V.diagramContainer.offsetWidth-V.bottomResizer.offsetWidth)/2+"px";V.bottomResizer.style.top=V.diagramContainer.offsetTop+V.diagramContainer.offsetHeight-V.bottomResizer.offsetHeight/2-1+"px";V.rightResizer.style.left=V.diagramContainer.offsetLeft+V.diagramContainer.offsetWidth-V.rightResizer.offsetWidth/2-1+"px";V.rightResizer.style.top=V.diagramContainer.offsetTop+(V.diagramContainer.offsetHeight-V.bottomResizer.offsetHeight)/
-2+"px"}V.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";V.rightResizer.style.visibility=V.bottomResizer.style.visibility;W.style.display="none";da.style.visibility="";T.style.visibility=""}),ra=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ma()});P=mxUtils.bind(this,
-function(){ra();b(V,!0);V.initFormatWindow();var va=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(va.x+va.width+4,va.y)});V.addListener("inlineFullscreenChanged",ra);V.addListener("editInlineStart",P);"1"==urlParams.embedInline&&V.addListener("darkModeChanged",P);V.addListener("editInlineStop",mxUtils.bind(this,function(va){V.diagramContainer.style.width="10px";V.diagramContainer.style.height="10px";V.diagramContainer.style.border="";V.bottomResizer.style.visibility=
-"hidden";V.rightResizer.style.visibility="hidden";da.style.visibility="hidden";T.style.visibility="hidden";R.style.display="none"}));if(null!=V.hoverIcons){var xa=V.hoverIcons.update;V.hoverIcons.update=function(){J.freehand.isDrawing()||xa.apply(this,arguments)}}if(null!=J.freehand){var ta=J.freehand.createStyle;J.freehand.createStyle=function(va){return ta.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){R.className="geToolbarContainer";T.className="geToolbarContainer";da.className=
-"geToolbarContainer";W.className="geToolbarContainer";V.picker=R;var Aa=!1;"1"!=urlParams.embed&&"atlassian"!=V.getServiceName()&&(mxEvent.addListener(W,"mouseenter",function(){V.statusContainer.style.display="inline-block"}),mxEvent.addListener(W,"mouseleave",function(){Aa||(V.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(va){null!=V.notificationBtn&&(null!=va?V.notificationBtn.setAttribute("title",va):V.notificationBtn.removeAttribute("title"))});W.style.visibility=
-20>W.clientWidth?"hidden":"";V.editor.addListener("statusChanged",mxUtils.bind(this,function(){V.setStatusText(V.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=V.getServiceName())if(V.statusContainer.style.display="inline-block",Aa=!0,1==V.statusContainer.children.length&&""==V.editor.getStatus())W.style.visibility="hidden";else{if(0==V.statusContainer.children.length||1==V.statusContainer.children.length&&"function"===typeof V.statusContainer.firstChild.getAttribute&&null==V.statusContainer.firstChild.getAttribute("class")){var va=
+2+"px"}V.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";V.rightResizer.style.visibility=V.bottomResizer.style.visibility;ea.style.display="none";da.style.visibility="";T.style.visibility=""}),ra=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ma()});R=mxUtils.bind(this,
+function(){ra();b(V,!0);V.initFormatWindow();var va=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(va.x+va.width+4,va.y)});V.addListener("inlineFullscreenChanged",ra);V.addListener("editInlineStart",R);"1"==urlParams.embedInline&&V.addListener("darkModeChanged",R);V.addListener("editInlineStop",mxUtils.bind(this,function(va){V.diagramContainer.style.width="10px";V.diagramContainer.style.height="10px";V.diagramContainer.style.border="";V.bottomResizer.style.visibility=
+"hidden";V.rightResizer.style.visibility="hidden";da.style.visibility="hidden";T.style.visibility="hidden";S.style.display="none"}));if(null!=V.hoverIcons){var xa=V.hoverIcons.update;V.hoverIcons.update=function(){L.freehand.isDrawing()||xa.apply(this,arguments)}}if(null!=L.freehand){var ta=L.freehand.createStyle;L.freehand.createStyle=function(va){return ta.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";T.className="geToolbarContainer";da.className=
+"geToolbarContainer";ea.className="geToolbarContainer";V.picker=S;var Aa=!1;"1"!=urlParams.embed&&"atlassian"!=V.getServiceName()&&(mxEvent.addListener(ea,"mouseenter",function(){V.statusContainer.style.display="inline-block"}),mxEvent.addListener(ea,"mouseleave",function(){Aa||(V.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(va){null!=V.notificationBtn&&(null!=va?V.notificationBtn.setAttribute("title",va):V.notificationBtn.removeAttribute("title"))});ea.style.visibility=
+20>ea.clientWidth?"hidden":"";V.editor.addListener("statusChanged",mxUtils.bind(this,function(){V.setStatusText(V.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=V.getServiceName())if(V.statusContainer.style.display="inline-block",Aa=!0,1==V.statusContainer.children.length&&""==V.editor.getStatus())ea.style.visibility="hidden";else{if(0==V.statusContainer.children.length||1==V.statusContainer.children.length&&"function"===typeof V.statusContainer.firstChild.getAttribute&&null==V.statusContainer.firstChild.getAttribute("class")){var va=
null!=V.statusContainer.firstChild&&"function"===typeof V.statusContainer.firstChild.getAttribute?V.statusContainer.firstChild.getAttribute("title"):V.editor.getStatus();Ca(va);var ya=V.getCurrentFile();ya=null!=ya?ya.savingStatusKey:DrawioFile.prototype.savingStatusKey;va==mxResources.get(ya)+"..."?(V.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ya))+'..."src="'+Editor.tailSpin+'">',V.statusContainer.style.display="inline-block",Aa=!0):6<V.buttonContainer.clientWidth&&
-(V.statusContainer.style.display="none",Aa=!1)}else V.statusContainer.style.display="inline-block",Ca(null),Aa=!0;W.style.visibility=20>W.clientWidth&&!Aa?"hidden":""}}));pa=N("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";da.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(va){(mxEvent.isShiftDown(va)||mxEvent.isAltDown(va)||mxEvent.isMetaDown(va)||mxEvent.isControlDown(va)||mxEvent.isPopupTrigger(va))&&
+(V.statusContainer.style.display="none",Aa=!1)}else V.statusContainer.style.display="inline-block",Ca(null),Aa=!0;ea.style.visibility=20>ea.clientWidth&&!Aa?"hidden":""}}));pa=Q("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";da.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(va){(mxEvent.isShiftDown(va)||mxEvent.isAltDown(va)||mxEvent.isMetaDown(va)||mxEvent.isControlDown(va)||mxEvent.isPopupTrigger(va))&&
this.appIconClicked(va)}),null,null);V.statusContainer.style.position="";V.statusContainer.style.display="none";V.statusContainer.style.margin="0px";V.statusContainer.style.padding="6px 0px";V.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";V.statusContainer.style.display="inline-block";V.statusContainer.style.textOverflow="ellipsis";V.buttonContainer.style.position="";V.buttonContainer.style.paddingRight="0px";V.buttonContainer.style.display="inline-block";var Ba=document.createElement("a");
-Ba.style.padding="0px";Ba.style.boxShadow="none";Ba.className="geMenuItem";Ba.style.display="inline-block";Ba.style.width="40px";Ba.style.height="12px";Ba.style.marginBottom="-2px";Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Ba.style.backgroundPosition="top center";Ba.style.backgroundRepeat="no-repeat";Ba.setAttribute("title","Minimize");var sa=!1,Oa=mxUtils.bind(this,function(){R.innerText="";if(!sa){var va=function(Ja,Pa,Ya){Ja=Y("",Ja.funct,null,Pa,Ja,Ya);Ja.style.width=
-"40px";Ja.style.opacity="0.7";return ya(Ja,null,"pointer")},ya=function(Ja,Pa,Ya){null!=Pa&&Ja.setAttribute("title",Pa);Ja.style.cursor=null!=Ya?Ya:"default";Ja.style.margin="2px 0px";R.appendChild(Ja);mxUtils.br(R);return Ja};ya(V.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)");ya(V.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"));ya(V.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ya(V.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ja=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,0),!1);Ja.geometry.points=[];Ja.geometry.relative=!0;Ja.edge=!0;ya(V.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,Ja.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ja=Ja.clone();Ja.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ja.geometry.width=J.defaultEdgeLength+20;Ja.geometry.setTerminalPoint(new mxPoint(0,
+Ba.style.padding="0px";Ba.style.boxShadow="none";Ba.className="geMenuItem";Ba.style.display="inline-block";Ba.style.width="40px";Ba.style.height="12px";Ba.style.marginBottom="-2px";Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Ba.style.backgroundPosition="top center";Ba.style.backgroundRepeat="no-repeat";Ba.setAttribute("title","Minimize");var sa=!1,Pa=mxUtils.bind(this,function(){S.innerText="";if(!sa){var va=function(Ja,Qa,Za){Ja=X("",Ja.funct,null,Qa,Ja,Za);Ja.style.width=
+"40px";Ja.style.opacity="0.7";return ya(Ja,null,"pointer")},ya=function(Ja,Qa,Za){null!=Qa&&Ja.setAttribute("title",Qa);Ja.style.cursor=null!=Za?Za:"default";Ja.style.margin="2px 0px";S.appendChild(Ja);mxUtils.br(S);return Ja};ya(V.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)");ya(V.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"));ya(V.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ya(V.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ja=new mxCell("",new mxGeometry(0,0,L.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+Ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,0),!1);Ja.geometry.points=[];Ja.geometry.relative=!0;Ja.edge=!0;ya(V.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,Ja.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ja=Ja.clone();Ja.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ja.geometry.width=L.defaultEdgeLength+20;Ja.geometry.setTerminalPoint(new mxPoint(0,
20),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,20),!1);Ja=ya(V.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ja.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ja.style.paddingBottom="14px";Ja.style.marginBottom="14px"})();va(V.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Na=V.actions.get("toggleShapes");va(Na,mxResources.get("shapes")+
-" ("+Na.shortcut+")",O);pa=N("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer");pa=N("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer")}"1"!=urlParams.embedInline&&R.appendChild(Ba)});mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){sa?(mxUtils.setPrefixedStyle(R.style,
-"transform","translate(0, -50%)"),R.style.padding="8px 6px 4px",R.style.top="50%",R.style.bottom="",R.style.height="",Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ba.style.width="40px",Ba.style.height="12px",Ba.setAttribute("title","Minimize"),sa=!1,Oa()):(R.innerText="",R.appendChild(Ba),mxUtils.setPrefixedStyle(R.style,"transform","translate(0, 0)"),R.style.top="",R.style.bottom="12px",R.style.padding="0px",R.style.height="24px",Ba.style.height="24px",Ba.style.backgroundImage=
-"url("+Editor.plusImage+")",Ba.setAttribute("title",mxResources.get("insert")),Ba.style.width="24px",sa=!0)}));Oa();V.addListener("darkModeChanged",Oa);V.addListener("sketchModeChanged",Oa)}else V.editor.addListener("statusChanged",mxUtils.bind(this,function(){V.setStatusText(V.editor.getStatus())}));if(null!=H){var Ta=function(va){mxEvent.isShiftDown(va)?(V.hideCurrentMenu(),V.actions.get("smartFit").funct(),mxEvent.consume(va)):mxEvent.isAltDown(va)&&(V.hideCurrentMenu(),V.actions.get("customZoom").funct(),
-mxEvent.consume(va))},Sa=V.actions.get("zoomIn"),$a=V.actions.get("zoomOut"),Ga=V.actions.get("resetView");P=V.actions.get("fullscreen");var eb=V.actions.get("undo"),bb=V.actions.get("redo"),z=Y("",eb.funct,null,mxResources.get("undo")+" ("+eb.shortcut+")",eb,Editor.undoImage),L=Y("",bb.funct,null,mxResources.get("redo")+" ("+bb.shortcut+")",bb,Editor.redoImage),M=Y("",P.funct,null,mxResources.get("fullscreen"),P,Editor.fullscreenImage);if(null!=T){Ga=function(){ua.style.display=null!=V.pages&&("0"!=
-urlParams.pages||1<V.pages.length||Editor.pagesVisible)?"inline-block":"none"};var U=function(){ua.innerText="";if(null!=V.currentPage){mxUtils.write(ua,V.currentPage.getName());var va=null!=V.pages?V.pages.length:1,ya=V.getPageIndex(V.currentPage);ya=null!=ya?ya+1:1;var Na=V.currentPage.getId();ua.setAttribute("title",V.currentPage.getName()+" ("+ya+"/"+va+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var X=V.actions.get("delete"),fa=Y("",X.funct,null,mxResources.get("delete"),X,Editor.trashImage);
-fa.style.opacity="0.1";da.appendChild(fa);X.addListener("stateChanged",function(){fa.style.opacity=X.enabled?"":"0.1"});var na=function(){z.style.display=0<V.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=eb.enabled?"":"0.1";L.style.opacity=bb.enabled?"":"0.1"};da.appendChild(z);da.appendChild(L);eb.addListener("stateChanged",na);bb.addListener("stateChanged",na);na();var ua=this.createPageMenuTab(!1,!0);ua.style.display="none";
+" ("+Na.shortcut+")",P);pa=Q("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer");pa=Q("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(Ba)});mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){sa?(mxUtils.setPrefixedStyle(S.style,
+"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ba.style.width="40px",Ba.style.height="12px",Ba.setAttribute("title","Minimize"),sa=!1,Pa()):(S.innerText="",S.appendChild(Ba),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",Ba.style.height="24px",Ba.style.backgroundImage=
+"url("+Editor.plusImage+")",Ba.setAttribute("title",mxResources.get("insert")),Ba.style.width="24px",sa=!0)}));Pa();V.addListener("darkModeChanged",Pa);V.addListener("sketchModeChanged",Pa)}else V.editor.addListener("statusChanged",mxUtils.bind(this,function(){V.setStatusText(V.editor.getStatus())}));if(null!=H){var Ta=function(va){mxEvent.isShiftDown(va)?(V.hideCurrentMenu(),V.actions.get("smartFit").funct(),mxEvent.consume(va)):mxEvent.isAltDown(va)&&(V.hideCurrentMenu(),V.actions.get("customZoom").funct(),
+mxEvent.consume(va))},Oa=V.actions.get("zoomIn"),Xa=V.actions.get("zoomOut"),Ga=V.actions.get("resetView");R=V.actions.get("fullscreen");var eb=V.actions.get("undo"),bb=V.actions.get("redo"),z=X("",eb.funct,null,mxResources.get("undo")+" ("+eb.shortcut+")",eb,Editor.undoImage),K=X("",bb.funct,null,mxResources.get("redo")+" ("+bb.shortcut+")",bb,Editor.redoImage),M=X("",R.funct,null,mxResources.get("fullscreen"),R,Editor.fullscreenImage);if(null!=T){Ga=function(){ua.style.display=null!=V.pages&&("0"!=
+urlParams.pages||1<V.pages.length||Editor.pagesVisible)?"inline-block":"none"};var U=function(){ua.innerText="";if(null!=V.currentPage){mxUtils.write(ua,V.currentPage.getName());var va=null!=V.pages?V.pages.length:1,ya=V.getPageIndex(V.currentPage);ya=null!=ya?ya+1:1;var Na=V.currentPage.getId();ua.setAttribute("title",V.currentPage.getName()+" ("+ya+"/"+va+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var W=V.actions.get("delete"),ha=X("",W.funct,null,mxResources.get("delete"),W,Editor.trashImage);
+ha.style.opacity="0.1";da.appendChild(ha);W.addListener("stateChanged",function(){ha.style.opacity=W.enabled?"":"0.1"});var na=function(){z.style.display=0<V.editor.undoManager.history.length||L.isEditing()?"inline-block":"none";K.style.display=z.style.display;z.style.opacity=eb.enabled?"":"0.1";K.style.opacity=bb.enabled?"":"0.1"};da.appendChild(z);da.appendChild(K);eb.addListener("stateChanged",na);bb.addListener("stateChanged",na);na();var ua=this.createPageMenuTab(!1,!0);ua.style.display="none";
ua.style.position="";ua.style.marginLeft="";ua.style.top="";ua.style.left="";ua.style.height="100%";ua.style.lineHeight="";ua.style.borderStyle="none";ua.style.padding="3px 0";ua.style.margin="0px";ua.style.background="";ua.style.border="";ua.style.boxShadow="none";ua.style.verticalAlign="top";ua.style.width="auto";ua.style.maxWidth="160px";ua.style.position="relative";ua.style.padding="6px";ua.style.textOverflow="ellipsis";ua.style.opacity="0.8";T.appendChild(ua);V.editor.addListener("pagesPatched",
-U);V.editor.addListener("pageSelected",U);V.editor.addListener("pageRenamed",U);V.editor.addListener("fileLoaded",U);U();V.addListener("fileDescriptorChanged",Ga);V.addListener("pagesVisibleChanged",Ga);V.editor.addListener("pagesPatched",Ga);Ga();Ga=Y("",$a.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",$a,Editor.zoomOutImage);T.appendChild(Ga);var pa=S.addMenu("100%",H.funct);pa.setAttribute("title",mxResources.get("zoom"));pa.innerHTML="100%";pa.style.display="inline-block";
-pa.style.color="inherit";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";T.appendChild(pa);H=Y("",Sa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Sa,Editor.zoomInImage);T.appendChild(H);P.visible&&(T.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
-function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=V.actions.get("exit"),T.appendChild(Y("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));V.tabContainer.style.visibility="hidden";W.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-da.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(da);u.appendChild(T);R.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(R.style.touchAction="none");u.appendChild(R);window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var za=Y("",Ta,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ga,Editor.zoomFitImage);W.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";pa=S.addMenu("100%",
+U);V.editor.addListener("pageSelected",U);V.editor.addListener("pageRenamed",U);V.editor.addListener("fileLoaded",U);U();V.addListener("fileDescriptorChanged",Ga);V.addListener("pagesVisibleChanged",Ga);V.editor.addListener("pagesPatched",Ga);Ga();Ga=X("",Xa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Xa,Editor.zoomOutImage);T.appendChild(Ga);var pa=N.addMenu("100%",H.funct);pa.setAttribute("title",mxResources.get("zoom"));pa.innerHTML="100%";pa.style.display="inline-block";
+pa.style.color="inherit";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";T.appendChild(pa);H=X("",Oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Oa,Editor.zoomInImage);T.appendChild(H);R.visible&&(T.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
+function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=V.actions.get("exit"),T.appendChild(X("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));V.tabContainer.style.visibility="hidden";ea.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+da.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";T.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(da);u.appendChild(T);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(S.style.touchAction="none");u.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var za=X("",Ta,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ga,Editor.zoomFitImage);ea.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";pa=N.addMenu("100%",
H.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(V.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(V.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";u.appendChild(pa)}(function(va){mxEvent.addListener(va,"click",Ta);var ya=mxUtils.bind(this,function(){va.innerText="";mxUtils.write(va,Math.round(100*V.editor.graph.view.scale)+"%")});V.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ya);V.editor.addListener("resetGraphView",ya);V.editor.addListener("pageSelected",
-ya)})(pa);var Da=V.setGraphEnabled;V.setGraphEnabled=function(){Da.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}u.appendChild(W);u.appendChild(V.diagramContainer);ja.appendChild(u);V.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&u.appendChild(V.tabContainer);
+ya)})(pa);var Da=V.setGraphEnabled;V.setGraphEnabled=function(){Da.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==T?this.tabContainerHeight+"px":"0px")}}u.appendChild(ea);u.appendChild(V.diagramContainer);ia.appendChild(u);V.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==T&&u.appendChild(V.tabContainer);
var Ma=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=V.sidebarWindow&&V.sidebarWindow.window.fit();null!=V.formatWindow&&V.formatWindow.window.fit();null!=V.actions.outlineWindow&&V.actions.outlineWindow.window.fit();null!=V.actions.layersWindow&&V.actions.layersWindow.window.fit();null!=V.menus.tagsWindow&&V.menus.tagsWindow.window.fit();null!=V.menus.findWindow&&V.menus.findWindow.window.fit();null!=V.menus.findReplaceWindow&&V.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";R.style.transform="";mxEvent.addGestureListeners(V.diagramContainer.parentNode,function(va){mxEvent.getSource(va)==V.diagramContainer.parentNode&&(V.embedExitPoint=new mxPoint(mxEvent.getClientX(va),mxEvent.getClientY(va)),V.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-ja.style.cursor="row-resize";V.diagramContainer.parentNode.appendChild(ja);V.bottomResizer=ja;var La=null,Ua=null,Ra=null,Fa=null;mxEvent.addGestureListeners(ja,function(va){Fa=parseInt(V.diagramContainer.style.height);Ua=mxEvent.getClientY(va);J.popupMenuHandler.hideMenu();mxEvent.consume(va)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";V.diagramContainer.parentNode.appendChild(ja);V.rightResizer=ja;mxEvent.addGestureListeners(ja,function(va){Ra=parseInt(V.diagramContainer.style.width);La=
-mxEvent.getClientX(va);J.popupMenuHandler.hideMenu();mxEvent.consume(va)});mxEvent.addGestureListeners(document.body,null,function(va){var ya=!1;null!=La&&(V.diagramContainer.style.width=Math.max(20,Ra+mxEvent.getClientX(va)-La)+"px",ya=!0);null!=Ua&&(V.diagramContainer.style.height=Math.max(20,Fa+mxEvent.getClientY(va)-Ua)+"px",ya=!0);ya&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:V.diagramContainer.getBoundingClientRect()}),
-"*"),ma(),V.refresh())},function(va){null==La&&null==Ua||mxEvent.consume(va);Ua=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";V.bottomResizer.style.visibility="hidden";V.rightResizer.style.visibility="hidden";da.style.visibility="hidden";T.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&V.editor.loadFonts()}}};
+urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mxEvent.addGestureListeners(V.diagramContainer.parentNode,function(va){mxEvent.getSource(va)==V.diagramContainer.parentNode&&(V.embedExitPoint=new mxPoint(mxEvent.getClientX(va),mxEvent.getClientY(va)),V.sendEmbeddedSvgExport())});ia=document.createElement("div");ia.style.position="absolute";ia.style.width="10px";ia.style.height="10px";ia.style.borderRadius="5px";ia.style.border="1px solid gray";ia.style.background="#ffffff";
+ia.style.cursor="row-resize";V.diagramContainer.parentNode.appendChild(ia);V.bottomResizer=ia;var La=null,Ua=null,Sa=null,Fa=null;mxEvent.addGestureListeners(ia,function(va){Fa=parseInt(V.diagramContainer.style.height);Ua=mxEvent.getClientY(va);L.popupMenuHandler.hideMenu();mxEvent.consume(va)});ia=ia.cloneNode(!1);ia.style.cursor="col-resize";V.diagramContainer.parentNode.appendChild(ia);V.rightResizer=ia;mxEvent.addGestureListeners(ia,function(va){Sa=parseInt(V.diagramContainer.style.width);La=
+mxEvent.getClientX(va);L.popupMenuHandler.hideMenu();mxEvent.consume(va)});mxEvent.addGestureListeners(document.body,null,function(va){var ya=!1;null!=La&&(V.diagramContainer.style.width=Math.max(20,Sa+mxEvent.getClientX(va)-La)+"px",ya=!0);null!=Ua&&(V.diagramContainer.style.height=Math.max(20,Fa+mxEvent.getClientY(va)-Ua)+"px",ya=!0);ya&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:V.diagramContainer.getBoundingClientRect()}),
+"*"),ma(),V.refresh())},function(va){null==La&&null==Ua||mxEvent.consume(va);Ua=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";V.bottomResizer.style.visibility="hidden";V.rightResizer.style.visibility="hidden";da.style.visibility="hidden";T.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&V.editor.loadFonts()}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
@@ -4054,7 +4054,7 @@ this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO
this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(I){return d.getImageUrl(I)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<
f.length){if(null!=this.pageId)for(var g=0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(I){var G=f[d.currentPage];return"page"==I?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==I?d.currentPage+1:"pagecount"==I?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(I){this.handlingResize||(this.currentPage=mxUtils.mod(I,this.diagrams.length),
this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(I){I=this.getIndexById(I);var G=0<=I;G&&this.selectPage(I);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var y=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(I){if(null!=I&&Graph.isPageLink(I.src)){var G=I.src,
-aa=G.indexOf(",");0<aa&&(aa=d.getIndexById(G.substring(aa+1)),0<=aa&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[aa])),I.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var aa=this.view.translate,ca=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((aa.x+I.x)*ca,(aa.y+I.y)*ca,I.width*ca,I.height*ca))}return G};this.addListener("xmlNodeChanged",
+Z=G.indexOf(",");0<Z&&(Z=d.getIndexById(G.substring(Z+1)),0<=Z&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Z])),I.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Z=this.view.translate,ca=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Z.x+I.x)*ca,(Z.y+I.y)*ca,I.width*ca,I.height*ca))}return G};this.addListener("xmlNodeChanged",
g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())&&"auto"==
this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&
!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(I){if(Graph.isPageLink(I)){var G=I.indexOf(",");d.selectPageById(I.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(I);return!0};var C=this.graph.foldTreeCell;this.graph.foldTreeCell=
@@ -4077,26 +4077,26 @@ null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
-GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,V){var J=document.createElement("div");J.style.borderRight="1px solid #d0d0d0";J.style.padding="3px 6px 3px 6px";mxEvent.addListener(J,"click",ea);null!=ja&&J.setAttribute("title",ja);J.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==V||V?(mxEvent.addListener(J,"mouseenter",function(){J.style.backgroundColor="#ddd"}),mxEvent.addListener(J,
-"mouseleave",function(){J.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),J.style.cursor="pointer"):mxUtils.setOpacity(J,30);J.appendChild(ea);k.appendChild(J);m++;return J}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
-"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),E=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(E(30),t())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){E(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
-this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ea,ka){},mouseUp:function(ea,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,I=0;I<g.length;I++){var G=
-g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(C,70);var aa=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");aa.style.borderRightStyle="none";aa.style.paddingLeft="0px";aa.style.paddingRight="0px";k.appendChild(C);var ca=
-b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ca.style.paddingLeft="0px";ca.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";aa.style.display=C.style.display;ca.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
-function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==G){if(this.layersEnabled){var ba=this.graph.getModel(),
-Z=b(mxUtils.bind(this,function(ea){if(null!=q)q.parentNode.removeChild(q),q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ja=this.graph.getGraphBounds(),V=this.graph.view;0>ja.x||0>ja.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:V.translate.clone(),scale:V.scale}):null!=this.graph.originalViewState&&0<ja.x/V.scale+this.graph.originalViewState.translate.x-
-V.translate.x&&0<ja.y/V.scale+this.graph.originalViewState.translate.y-V.translate.y&&(V.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:V.translate.clone(),scale:V.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ea=Z.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";
-q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize="11px";q.style.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var ka=mxUtils.getDocumentScrollOrigin(document);q.style.left=ka.x+ea.left-1+"px";q.style.top=ka.y+ea.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");ba.addListener(mxEvent.CHANGE,function(){Z.style.display=
-1<ba.getChildCount(ba.root)?"inline-block":"none"});Z.style.display=1<ba.getChildCount(ba.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(ea){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
-y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ea=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);F.style.left=ka.x+ea.left-1+"px";F.style.top=
-ka.y+ea.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+GraphViewer.prototype.addToolbar=function(){function b(fa,ka,ia,V){var L=document.createElement("div");L.style.borderRight="1px solid #d0d0d0";L.style.padding="3px 6px 3px 6px";mxEvent.addListener(L,"click",fa);null!=ia&&L.setAttribute("title",ia);L.style.display="inline-block";fa=document.createElement("img");fa.setAttribute("border","0");fa.setAttribute("src",ka);fa.style.width="18px";null==V||V?(mxEvent.addListener(L,"mouseenter",function(){L.style.backgroundColor="#ddd"}),mxEvent.addListener(L,
+"mouseleave",function(){L.style.backgroundColor="#eee"}),mxUtils.setOpacity(fa,60),L.style.cursor="pointer"):mxUtils.setOpacity(L,30);L.appendChild(fa);k.appendChild(L);m++;return L}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(fa){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),fa||200)}),E=mxUtils.bind(this,function(fa){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,fa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(fa){mxEvent.isTouchEvent(fa)||(E(30),t())}));mxEvent.addListener(k,
+mxClient.IS_POINTER?"pointermove":"mousemove",function(fa){mxEvent.consume(fa)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(fa){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(fa){E(100);mxEvent.consume(fa)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(fa){mxEvent.isTouchEvent(fa)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(fa,ka){this.startX=ka.getGraphX();
+this.startY=ka.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(fa,ka){},mouseUp:function(fa,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-ka.getGraphX())<f&&Math.abs(this.startY-ka.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,I=0;I<g.length;I++){var G=
+g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(C,70);var Z=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Z.style.borderRightStyle="none";Z.style.paddingLeft="0px";Z.style.paddingRight="0px";k.appendChild(C);var ca=
+b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ca.style.paddingLeft="0px";ca.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Z.style.display=C.style.display;ca.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
+function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==G){if(this.layersEnabled){var aa=this.graph.getModel(),
+Y=b(mxUtils.bind(this,function(fa){if(null!=q)q.parentNode.removeChild(q),q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ia=this.graph.getGraphBounds(),V=this.graph.view;0>ia.x||0>ia.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:V.translate.clone(),scale:V.scale}):null!=this.graph.originalViewState&&0<ia.x/V.scale+this.graph.originalViewState.translate.x-
+V.translate.x&&0<ia.y/V.scale+this.graph.originalViewState.translate.y-V.translate.y&&(V.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:V.translate.clone(),scale:V.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});fa=Y.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";
+q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize="11px";q.style.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var ka=mxUtils.getDocumentScrollOrigin(document);q.style.left=ka.x+fa.left-1+"px";q.style.top=ka.y+fa.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");aa.addListener(mxEvent.CHANGE,function(){Y.style.display=
+1<aa.getChildCount(aa.root)?"inline-block":"none"});Y.style.display=1<aa.getChildCount(aa.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(fa){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
+y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});fa=qa.getBoundingClientRect();var ka=mxUtils.getDocumentScrollOrigin(document);F.style.left=ka.x+fa.left-1+"px";F.style.top=
+ka.y+fa.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");aa.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var N=e.style.border,Y=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
-{left:-ka.x,top:-ka.y};ea={left:ea.left-ka.left,top:ea.top-ka.top,bottom:ea.bottom-ka.top,right:ea.right-ka.left};k.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ea.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ea.top+1+"px"):k.style.top=ea.top+"px";"1px solid transparent"==N&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ja=mxUtils.bind(this,function(){null!=k.parentNode&&
-k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=N});mxEvent.addListener(document,"mousemove",function(V){for(V=mxEvent.getSource(V);null!=V;){if(V==e||V==k||V==q)return;V=V.parentNode}ja()});mxEvent.addListener(document.body,"mouseleave",function(V){ja()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",Y):Y();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-k.parentNode&&Y()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var Q=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var fa=e.getBoundingClientRect(),ka=mxUtils.getScrollOrigin(document.body);ka="relative"===document.body.style.position?document.body.getBoundingClientRect():
+{left:-ka.x,top:-ka.y};fa={left:fa.left-ka.left,top:fa.top-ka.top,bottom:fa.bottom-ka.top,right:fa.right-ka.left};k.style.left=fa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=fa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=fa.top+1+"px"):k.style.top=fa.top+"px";"1px solid transparent"==Q&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ia=mxUtils.bind(this,function(){null!=k.parentNode&&
+k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=Q});mxEvent.addListener(document,"mousemove",function(V){for(V=mxEvent.getSource(V);null!=V;){if(V==e||V==k||V==q)return;V=V.parentNode}ia()});mxEvent.addListener(document.body,"mouseleave",function(V){ia()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",X):X();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+k.parentNode&&X()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,n){if(null==n)for(var D=mxEvent.getSource(k);D!=b.container&&null!=D&&null==n;)"a"==D.nodeName.toLowerCase()&&(n=D.getAttribute("href")),D=D.parentNode;null!=e?null==n||b.isCustomLink(n)?mxEvent.consume(k):b.isExternalProtocol(n)||b.isBlankLink(n)||window.setTimeout(function(){e.destroy()},0):null!=n&&null==e&&b.isCustomLink(n)&&
(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(n)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
@@ -4117,7 +4117,7 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var n=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;n.open("GET",b);n.onload=function(){e(null!=n.getText?n.getText():n.responseText)};n.onerror=k;n.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function E(q,y){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(y);else if(q.resizedAttached){q.resizedAttached.add(y);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var aa=!1,ca=function(){q.resizedAttached&&(aa&&(q.resizedAttached.call(),aa=!1),b(ca))};b(ca);var ba,Z,qa,N;y=function(){if((qa=q.offsetWidth)!=ba||(N=q.offsetHeight)!=Z)aa=!0,ba=qa,Z=N;G()};var Y=
-function(ea,ka,ja){ea.attachEvent?ea.attachEvent("on"+ka,ja):ea.addEventListener(ka,ja)};Y(F,"scroll",y);Y(I,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
-y;q++)e.detach(k[q]);else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
+q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Z=!1,ca=function(){q.resizedAttached&&(Z&&(q.resizedAttached.call(),Z=!1),b(ca))};b(ca);var aa,Y,qa,Q;y=function(){if((qa=q.offsetWidth)!=aa||(Q=q.offsetHeight)!=Y)Z=!0,aa=qa,Y=Q;G()};var X=function(fa,
+ka,ia){fa.attachEvent?fa.attachEvent("on"+ka,ia):fa.addEventListener(ka,ia)};X(F,"scroll",y);X(I,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<y;q++)e.detach(k[q]);
+else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();