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:
authorDavid Benson [draw.io] <david@jgraph.com>2021-10-11 16:55:08 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-10-11 16:55:08 +0300
commit6572d133b397eeb1973b6debcae8898e0d688b56 (patch)
tree57c4533879bd5ff853045c5ae58388832bfa6bd0
parent971e8d23fef4133fb746535f509c0959b9810eeb (diff)
15.5.1 releasev15.5.1
-rw-r--r--ChangeLog7
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js1502
-rw-r--r--src/main/webapp/js/diagramly/App.js2
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js2
-rw-r--r--src/main/webapp/js/diagramly/Editor.js24
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js157
-rw-r--r--src/main/webapp/js/diagramly/Init.js9
-rw-r--r--src/main/webapp/js/diagramly/Menus.js81
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js433
-rw-r--r--src/main/webapp/js/diagramly/Pages.js2
-rw-r--r--src/main/webapp/js/diagramly/mxRuler.js8
-rw-r--r--src/main/webapp/js/grapheditor/Editor.js10
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js16
-rw-r--r--src/main/webapp/js/viewer-static.min.js1939
-rw-r--r--src/main/webapp/js/viewer.min.js1939
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/plugins/explore.js4
-rw-r--r--src/main/webapp/plugins/props.js2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
21 files changed, 3321 insertions, 2824 deletions
diff --git a/ChangeLog b/ChangeLog
index e7331993..b98af5dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+11-OCT_2021: 15.5.1
+
+- Adds embedInline URL parameter
+- Uses system dark mode for default
+- Fixes library depends on current edge style https://github.com/jgraph/drawio/issues/2308
+- Fixes handling of inlineFullscreen iframe
+
08-OCT-2021: 15.5.0
- Adds inches and meters as units
diff --git a/VERSION b/VERSION
index bc6c8612..ec8a15b4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.5.0 \ No newline at end of file
+15.5.1 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 2bd2ce20..df06319f 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -227,6 +227,7 @@ window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_C
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=require("@electron/remote").app.getLocale(),null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
+"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.proto="json",urlParams.prefetchFonts="1");
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}null==a&&"1"==urlParams.extAuth&&(a="sketch");try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch=
"1",a="min");return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
@@ -234,7 +235,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.5.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.5.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),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]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
@@ -2072,9 +2073,9 @@ Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIwIDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNWMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0wIDJ2M0g1VjVoMTV6bS01IDE0aC01di05aDV2OXpNNSAxMGgzdjlINXYtOXptMTIgOXYtOWgzdjloLTN6Ii8+PC9zdmc+";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=!0;Editor.simpleLabels=!1;
-Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(a){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
-Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
-Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
+Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(a){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
+Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;
+Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
Editor.prototype.editAsNew=function(a,b){var d=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var e=null,c=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==e&&(mxEvent.removeListener(window,"message",c),e.postMessage(a,"*"))});mxEvent.addListener(window,"message",c);e=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){var d=new Graph(null,b,null,null,a);d.transparentBackground=!1;var e=d.isCssTransformsSupported,c=this;d.isCssTransformsSupported=function(){return e.apply(this,arguments)&&(!c.chromeless||!mxClient.IS_SF)};this.chromeless||(d.isBlankLink=function(a){return!this.isExternalProtocol(a)});return d};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
@@ -2165,7 +2166,7 @@ this.setDefaultStyle=function(a){try{var b=e.view.getState(a);if(null!=b){var c=
"keys",c,"values",a,"cells",[b.cell]))}}catch(da){this.handleError(da)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var h=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<h.length;b++)0>mxUtils.indexOf(f,h[b])&&f.push(h[b]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(b=0;b<l.length;b++)for(d=0;d<l[b].length;d++)f.push(l[b][d]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(f,k[b])&&f.push(k[b]);var m=function(a,b,c,d,g,h,m){d=null!=d?d:e.currentVertexStyle;g=null!=g?g:e.currentEdgeStyle;c=null!=c?c:e.getModel();
if(m){m=[];for(var n=0;n<a.length;n++)m=m.concat(c.getDescendants(a[n]));a=m}c.beginUpdate();try{for(n=0;n<a.length;n++){var p=a[n],q;if(b)q=["fontSize","fontFamily","fontColor"];else{var u=c.getStyle(p),t=null!=u?u.split(";"):[];q=f.slice();for(var v=0;v<t.length;v++){var ba=t[v],x=ba.indexOf("=");if(0<=x){var O=ba.substring(0,x),E=mxUtils.indexOf(q,O);0<=E&&q.splice(E,1);for(m=0;m<l.length;m++){var z=l[m];if(0<=mxUtils.indexOf(z,O))for(var w=0;w<z.length;w++){var J=mxUtils.indexOf(q,z[w]);0<=J&&
-q.splice(J,1)}}}}}var P=c.isEdge(p);m=P?g:d;for(var Y=c.getStyle(p),v=0;v<q.length;v++){var O=q[v],I=m[O];null!=I&&("shape"!=O||P)&&(!P||h||0>mxUtils.indexOf(k,O))&&(Y=mxUtils.setStyle(Y,O,I))}Editor.simpleLabels&&(Y=mxUtils.setStyle(mxUtils.setStyle(Y,"html",null),"whiteSpace",null));c.setStyle(p,Y)}}finally{c.endUpdate()}return a};e.addListener("cellsInserted",function(a,b){m(b.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(a,b){m(b.getProperty("cells"),
+q.splice(J,1)}}}}}var P=c.isEdge(p);m=P?g:d;for(var Y=c.getStyle(p),v=0;v<q.length;v++){var O=q[v],I=m[O];null!=I&&"edgeStyle"!=O&&("shape"!=O||P)&&(!P||h||0>mxUtils.indexOf(k,O))&&(Y=mxUtils.setStyle(Y,O,I))}Editor.simpleLabels&&(Y=mxUtils.setStyle(mxUtils.setStyle(Y,"html",null),"whiteSpace",null));c.setStyle(p,Y)}}finally{c.endUpdate()}return a};e.addListener("cellsInserted",function(a,b){m(b.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(a,b){m(b.getProperty("cells"),
!0)});this.insertHandler=m;this.createDivs();this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return e.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=n,this.toolbarContainer.onmousedown=n,this.diagramContainer.onselectstart=n,this.diagramContainer.onmousedown=n,this.sidebarContainer.onselectstart=n,this.sidebarContainer.onmousedown=
n,this.formatContainer.onselectstart=n,this.formatContainer.onmousedown=n,this.footerContainer.onselectstart=n,this.footerContainer.onmousedown=n,null!=this.tabContainer&&(this.tabContainer.onselectstart=n));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var p=e.graphHandler.start;e.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();p.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
@@ -2282,10 +2283,10 @@ null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(b&&(a.isCon
this.actions.get("editLink").setEnabled(1==f.length);this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(f&&b);this.menus.get("align").setEnabled(f&&
b&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(f&&b&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,d=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var c=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-
-20)),f=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",f+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",f+=this.toolbarHeight);0<f&&(f+=1);b=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e,b=Math.max(0,Math.min(d-f-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=c+"px";this.sidebarFooterContainer.style.height=b+"px";
-this.sidebarFooterContainer.style.bottom=k+"px"}d=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=f+"px";this.sidebarContainer.style.width=c+"px";this.formatContainer.style.top=f+"px";this.formatContainer.style.width=d+"px";this.formatContainer.style.display=null!=this.format?"":"none";var k=this.getDiagramContainerOffset(),h=null!=this.hsplit.parentNode?c+this.splitSize:0;this.diagramContainer.style.left=h+k.x+"px";this.diagramContainer.style.top=f+k.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=c+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=h+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");this.diagramContainer.style.right=d+"px";c=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,c=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+b+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";this.diagramContainer.style.bottom=this.footerHeight+e+c+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+20)),b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var f=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e,f=Math.max(0,Math.min(d-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=c+"px";this.sidebarFooterContainer.style.height=f+"px";
+this.sidebarFooterContainer.style.bottom=k+"px"}d=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=c+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=d+"px";this.formatContainer.style.display=null!=this.format?"":"none";var k=this.getDiagramContainerOffset(),h=null!=this.hsplit.parentNode?c+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=c+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=h+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");c=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=this.diagramContainer.style.right,c=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
+f+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=h+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=d+"px",this.diagramContainer.style.bottom=this.footerHeight+e+c+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -9926,8 +9927,8 @@ RemoteLibrary.prototype.saveAs=function(b,e,d){};RemoteLibrary.prototype.updateF
var StorageDialog=function(b,e,d){function c(c,g,k,p,x,A){function q(){mxEvent.addListener(t,"click",null!=A?A:function(){k!=App.MODE_GOOGLE||b.isDriveDomain()?k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):
(b.setMode(k,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}f++;++n>d&&(mxUtils.br(l),n=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="inline-block";t.className="geBaseButton";t.style.boxSizing="border-box";t.style.fontSize="11px";t.style.position="relative";t.style.margin="4px";t.style.marginTop="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",
g);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";u.style.position="absolute";u.style.bottom="8px";u.style.left="0px";u.style.right="0px";mxUtils.write(u,g);t.appendChild(u);if(null!=c){var v=document.createElement("img");v.setAttribute("src",c);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";t.appendChild(v)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",
-mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(u),mxUtils.write(u,x[c]);if(null!=p&&null==b[p]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(t);var G=window.setTimeout(function(){null==
-b[p]&&(D.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(c,f){null!=b[p]&&f.getProperty("client")==b[p]&&(window.clearTimeout(G),mxUtils.setOpacity(u,100),v.style.visibility="",D.stop(),q(),"drive"==p&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else q();l.appendChild(t)}d=null!=d?d:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var g=document.createElement("div");
+mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(u),mxUtils.write(u,x[c]);if(null!=p&&null==b[p]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(t);var D=window.setTimeout(function(){null==
+b[p]&&(E.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(c,f){null!=b[p]&&f.getProperty("client")==b[p]&&(window.clearTimeout(D),mxUtils.setOpacity(u,100),v.style.visibility="",E.stop(),q(),"drive"==p&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else q();l.appendChild(t)}d=null!=d?d:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var g=document.createElement("div");
g.style.border="1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";g.style.padding="10px 0px 20px 0px";var n=0,f=0,l=document.createElement("div");l.style.paddingTop="2px";g.appendChild(l);var m=document.createElement("p"),p=document.createElement("p");p.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(p,mxResources.get("saveDiagramsTo")+":");k.appendChild(p);k.appendChild(g);n=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",
mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>f&&null!=b.notion&&c(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
@@ -9942,35 +9943,35 @@ mxEvent.addListener(g,"click",function(){b.hideDialog();b.actions.get("new").fun
mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_NOTION?mxResources.get("notion"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(d=function(c){g.style.marginBottom="24px";var f=document.createElement("a");
f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));g.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){c()})});k.appendChild(f)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var q=b.drive.getUsersList();if(0<q.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+
":");g.style.marginBottom="16px";k.style.paddingBottom="18px";k.appendChild(c);var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(d=0;d<q.length;d++)n=document.createElement("option"),mxUtils.write(n,q[d].displayName),n.value=d,t.appendChild(n),n=document.createElement("option"),n.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(n,"<"+q[d].email+">"),n.setAttribute("disabled","disabled"),t.appendChild(n);n=document.createElement("option");mxUtils.write(n,mxResources.get("addAccount"));
-n.value=q.length;t.appendChild(n);mxEvent.addListener(t,"change",function(){var c=t.value,f=q.length!=c;f&&b.drive.setUser(q[c]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(c){b.handleError(c,null,function(){b.hideDialog();b.showSplash()})},!0)});k.appendChild(t)}else d(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?d(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):
+n.value=q.length;t.appendChild(n);mxEvent.addListener(t,"change",function(){var f=t.value,c=q.length!=f;c&&b.drive.setUser(q[f]);b.drive.authorize(c,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(f){b.handleError(f,null,function(){b.hideDialog();b.showSplash()})},!0)});k.appendChild(t)}else d(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?d(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):
b.mode==App.MODE_GITLAB&&null!=b.gitLab?d(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_NOTION&&null!=b.notion?d(function(){b.notion.logout()}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&d(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&d(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):d(function(){b.oneDrive.logout()});e.appendChild(k);this.container=e},EmbedDialog=function(b,
e,d,c,k,g,n,f,l){n=null!=n?n:"Check out the diagram I made using @drawio";c=document.createElement("div");var m=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=g?mxUtils.write(c,g):mxUtils.write(c,mxResources.get(5E5>e.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,b.formatFileSize(e.length));c.appendChild(g);var p=document.createElement("textarea");
p.setAttribute("autocomplete","off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.fontFamily="monospace";p.style.wordBreak="break-all";p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");c.appendChild(p);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(p.value=e,p.focus(),mxClient.IS_GC||
mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=mxResources.get("tooLargeUseDownload"))},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(null!=f?f:mxResources.get(5E5>
-e.length?"preview":"openInNewWindow"),function(){var c=5E5>e.length?p.value:e;if(null!=k)k(c);else if(m)try{var f=b.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:
+e.length?"preview":"openInNewWindow"),function(){var f=5E5>e.length?p.value:e;if(null!=k)k(f);else if(m)try{var c=b.openLink(f);null!=c&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=c&&null!=c.location.href&&c.location.href.substring(0,8)!=f.substring(0,8)&&(c.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:
null;null!=l?(l.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),q.className="geBtn",g.appendChild(q));if(!m||7500<e.length)f=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData(null!=l?l:"embed.txt","txt",e,"text/plain")}),f.className="geBtn",g.appendChild(f);if(m&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>
-e.length){var t=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign=
-"bottom";t.style.paddingTop="4px";t.style.minWidth="46px";t.className="geBtn";g.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent(n)+"&url="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border",
+e.length){var t=mxUtils.button("",function(){try{var f="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(f)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign=
+"bottom";t.style.paddingTop="4px";t.style.minWidth="46px";t.className="geBtn";g.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var f="https://twitter.com/intent/tweet?text="+encodeURIComponent(n)+"&url="+encodeURIComponent(p.value);b.openLink(f)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border",
"0"),f.style.marginBottom="5px",t.appendChild(f),t.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),t.style.verticalAlign="bottom",t.style.paddingTop="4px",t.style.minWidth="46px",t.className="geBtn",g.appendChild(t))}f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.appendChild(f);t=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(t),t.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(q),f.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(g);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function d(){var b=null!=G&&null!=G.getTitle()?G.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(c+="&title="+encodeURIComponent(b));0<D.length&&(c+="&s="+D);""!=u.value&&"0"!=u.value&&(c+="&border="+u.value);""!=q.value&&(c+="&height="+q.value);c+="&pan="+(v.checked?"1":"0");c+="&zoom="+(x.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");
-c+="&resize="+(y.checked?"1":"0");c+="&x0="+Number(p.value);c+="&y0="+l;k.mathEnabled&&(c+="&math=1");z.checked?c+="&edit=_blank":A.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else G.constructor==DriveFile||G.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=G.getHash().substring(1),c=G.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=
-b&&(c+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),c+="&height="+b),m.value=c):m.value=""}var c=document.createElement("div"),k=b.editor.graph,g=k.getGraphBounds(),n=k.view.scale,f=Math.floor(g.x/n-k.view.translate.x),l=Math.floor(g.y/n-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
+var GoogleSitesDialog=function(b,e){function d(){var b=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var f="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(f+="&title="+encodeURIComponent(b));0<E.length&&(f+="&s="+E);""!=u.value&&"0"!=u.value&&(f+="&border="+u.value);""!=q.value&&(f+="&height="+q.value);f+="&pan="+(v.checked?"1":"0");f+="&zoom="+(x.checked?"1":"0");f+="&fit="+(B.checked?"1":"0");
+f+="&resize="+(y.checked?"1":"0");f+="&x0="+Number(p.value);f+="&y0="+l;k.mathEnabled&&(f+="&math=1");z.checked?f+="&edit=_blank":A.checked&&(f+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=f}else D.constructor==DriveFile||D.constructor==DropboxFile?(f="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?f+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(f+=D.getHash().substring(1),f=D.constructor==DropboxFile?f+"&type=2":f+"&type=1"),null!=
+b&&(f+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),f+="&height="+b),m.value=f):m.value=""}var c=document.createElement("div"),k=b.editor.graph,g=k.getGraphBounds(),n=k.view.scale,f=Math.floor(g.x/n-k.view.translate.x),l=Math.floor(g.y/n-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
c.appendChild(m);mxUtils.br(c);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginRight="16px";p.style.marginLeft="4px";p.value=f;c.appendChild(p);mxUtils.write(c,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");
q.setAttribute("size","4");q.style.marginLeft="4px";q.value=Math.ceil(g.height/n);c.appendChild(q);mxUtils.br(c);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";c.appendChild(g);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";c.appendChild(t);
mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var x=document.createElement("input");
x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
mxResources.get("asNew")+" ");mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";c.appendChild(B);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),G=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
+"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),D=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";g.appendChild(n);c.appendChild(g);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var g=new Graph(e);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";g.cellRenderer.installCellOverlayListeners=
-function(b,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
+function(b,f,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){f.fireEvent(new mxEventObject("pointerdown","event",c,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){f.fireEvent(new mxEventObject("pointerdown","event",c,"state",b))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
!1;g.connectionHandler.createEdgeState=function(b){b=g.createEdge(null,null,null,null,null,n);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var f=g.getDefaultParent(),l=mxUtils.bind(this,function(b){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,d){g.connectionHandler.reset();g.clearSelection();var e=g.getCellGeometry(b),m;q(function(){m=g.insertVertex(f,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(m);g.view.refresh(m);
-g.insertEdge(f,null,"",b,m,n)},function(){g.scrollCellToVisible(m)})});c.addListener("pointerdown",function(b,c){var f=c.getProperty("event"),d=c.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var e=mxUtils.convertPoint(g.container,mxEvent.getClientX(f),mxEvent.getClientY(f));g.connectionHandler.start(d,e.x,e.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(f);mxEvent.consume(f)});g.addCellOverlay(b,c)});g.getModel().beginUpdate();var m;try{m=g.insertVertex(f,null,"Start",
+g.insertEdge(f,null,"",b,m,n)},function(){g.scrollCellToVisible(m)})});c.addListener("pointerdown",function(b,f){var c=f.getProperty("event"),d=f.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var e=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,e.x,e.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(b,c)});g.getModel().beginUpdate();var m;try{m=g.insertVertex(f,null,"Start",
0,0,80,30,"ellipse"),l(m)}finally{g.getModel().endUpdate()}var p;"horizontalTree"==d?(p=new mxCompactTreeLayout(g),p.edgeRouting=!1,p.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(p=new mxCompactTreeLayout(g,!1),p.edgeRouting=!1,p.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(p=new mxRadialTreeLayout(g,!1),p.edgeRouting=!1,p.levelDistance=80):"verticalFlow"==d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(p=new mxFastOrganicLayout(g,!1),p.forceConstant=80):"circle"==d&&(p=new mxCircleLayout(g));if(null!=p){var q=function(b,c){g.getModel().beginUpdate();try{null!=b&&b(),p.execute(g.getDefaultParent(),m)}catch(y){throw y;}finally{var f=new mxMorphing(g);f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=c&&c()}));f.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(b,c,f,d,e){t.apply(this,arguments);q()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);q()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){q()})}var u=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(c){g.clearCellOverlays();
-var f=g.getModel().getChildren(g.getDefaultParent());c=mxEvent.isAltDown(c)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f=b.editor.graph.importCells(f,c.x,c.y);c=b.editor.graph.view;var d=c.getBounds(f);d.x-=c.translate.x;d.y-=c.translate.y;b.editor.graph.scrollRectToVisible(d);b.editor.graph.setSelectionCells(f);null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";
+d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(p=new mxFastOrganicLayout(g,!1),p.forceConstant=80):"circle"==d&&(p=new mxCircleLayout(g));if(null!=p){var q=function(b,f){g.getModel().beginUpdate();try{null!=b&&b(),p.execute(g.getDefaultParent(),m)}catch(y){throw y;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=f&&f()}));c.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(b,f,c,d,e){t.apply(this,arguments);q()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);q()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){q()})}var u=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(f){g.clearCellOverlays();
+var c=g.getModel().getChildren(g.getDefaultParent());f=mxEvent.isAltDown(f)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(g.getBoundingBoxFromGeometry(c,!0));c=b.editor.graph.importCells(c,f.x,f.y);f=b.editor.graph.view;var d=f.getBounds(c);d.x-=f.translate.x;d.y-=f.translate.y;b.editor.graph.scrollRectToVisible(d);b.editor.graph.setSelectionCells(c);null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(u)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
@@ -9978,25 +9979,25 @@ var BackgroundImageDialog=function(b,e,d){var c=document.createElement("div");c.
f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geBackgroundImageDialogOption");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.width="320px";l.value=g||null==d?"":d.src;var m=document.createElement("select");m.style.width="320px";if(null!=b.pages)for(var p=0;p<b.pages.length;p++){var q=document.createElement("option");mxUtils.write(q,b.pages[p].getName()||
mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),k=!0);m.appendChild(q)}g||null!=b.pages&&1!=b.pages.length||(n.style.display="none",f.style.display="none",m.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(m.value):""==l.value||b.isOffline()?(x.value="",A.value=
"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){x.value=b.width;A.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";A.value="";null!=d&&d(null)})))};this.init=function(){g?m.focus():l.focus();mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
-n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,
-"drop",mxUtils.bind(this,function(c){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,c,f,d,e,m){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&
-(l.value=decodeURIComponent(f),v())}c.stopPropagation();c.preventDefault()}),!1)}};c.appendChild(n);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||g?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
+n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(f){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(d,
+"drop",mxUtils.bind(this,function(f){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<f.dataTransfer.files.length)b.importFiles(f.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,f,c,d,e,m){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var f=0;f<b.length;f++)b[f]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(f.dataTransfer.types,"text/uri-list")){var c=f.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&
+(l.value=decodeURIComponent(c),v())}f.stopPropagation();f.preventDefault()}),!1)}};c.appendChild(n);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||g?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";A.value=null==d||g?"":d.height;c.appendChild(A);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(m);mxUtils.br(c);g?(f.setAttribute("checked","checked"),f.checked=
!0):(n.setAttribute("checked","checked"),n.checked=!0);if(!k&&f.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");m.appendChild(z);mxEvent.addListener(m,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";k=mxUtils.button(mxResources.get("reset"),
function(){l.value="";x.value="";A.value="";n.checked=!0;t=!1});mxEvent.addGestureListeners(k,function(){t=!0});k.className="geBtn";k.width="100";d.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,x.value,A.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
-!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(k);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(c,f,d){var e=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,k){g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(new mxRectangle(0,0,l,k));var p=null;m.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
-g.x,g.y):m.insertVertex(null,null,null,g.x,g.y,l,k,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=b.editor.graph,k="plantUmlTxt"==f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-c&&"svg"==k?window.setTimeout(function(){b.spinner.stop();l(c,k,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(c,k,function(f,d,e){b.spinner.stop();l(c,k,f,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==f)b.spinner.spin(document.body,mxResources.get("inserting"))&&(m=b.editor.graph,b.generateMermaidImage(c,k,function(f,e,l){g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var k=null;m.getModel().beginUpdate();try{k=m.insertVertex(null,null,null,g.x,g.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-f+";"),m.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=k&&(m.setSelectionCell(k),m.scrollCellToVisible(k))},function(c){b.handleError(c)}));else if("table"==f){var p=null,q=[],t=0;for(f=0;f<e.length;f++){var n=mxUtils.trim(e[f]);if("create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=mxUtils.trim(n.substring(0,n.length-1))),p=new mxCell(n,new mxGeometry(t,
+!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(k);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(f,c,d){var e=f.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,k){g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(new mxRectangle(0,0,l,k));var p=null;m.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
+g.x,g.y):m.insertVertex(null,null,null,g.x,g.y,l,k,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=b.editor.graph,k="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+f&&"svg"==k?window.setTimeout(function(){b.spinner.stop();l(f,k,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(f,k,function(c,d,e){b.spinner.stop();l(f,k,c,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==c)b.spinner.spin(document.body,mxResources.get("inserting"))&&(m=b.editor.graph,b.generateMermaidImage(f,k,function(c,e,l){g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var k=null;m.getModel().beginUpdate();try{k=m.insertVertex(null,null,null,g.x,g.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+c+";"),m.setAttributeForCell(k,"mermaidData",JSON.stringify({data:f,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=k&&(m.setSelectionCell(k),m.scrollCellToVisible(k))},function(c){b.handleError(c)}));else if("table"==c){var p=null,q=[],t=0;for(c=0;c<e.length;c++){var n=mxUtils.trim(e[c]);if("create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=mxUtils.trim(n.substring(0,n.length-1))),p=new mxCell(n,new mxGeometry(t,
0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,q.push(p),n=b.editor.graph.getPreferredSizeForCell(v),null!=n&&(p.geometry.width=n.width+10);else if(null!=p&&")"==n.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=n&&null!=p&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var u=n.toLowerCase().indexOf("primary key"),
n=n.replace(/primary key/i,""),v=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");v.vertex=!0;var I=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));I.vertex=!0;v.insert(I);n=new mxCell(n,new mxGeometry(30,
0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));n.vertex=!0;v.insert(n);n=b.editor.graph.getPreferredSizeForCell(n);null!=n&&p.geometry.width<n.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,n.width+30)));p.insert(v);p.geometry.height+=30}}0<q.length&&(m=b.editor.graph,g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),m.setSelectionCells(m.importCells(q,
-g.x,g.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==f){if(0<e.length){m=b.editor.graph;v=null;q=[];for(f=p=0;f<e.length;f++)";"!=e[f].charAt(0)&&(0==e[f].length?v=null:null==v?(v=new mxCell(e[f],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),v.vertex=!0,q.push(v),n=m.getPreferredSizeForCell(v),null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=
-n.width+10),p+=v.geometry.width+40):"--"==e[f]?(n=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),n.vertex=!0,v.geometry.height+=n.geometry.height,v.insert(n)):0<e[f].length&&(t=new mxCell(e[f],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-t.vertex=!0,n=m.getPreferredSizeForCell(t),null!=n&&t.geometry.width<n.width&&(t.geometry.width=n.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0));m.getModel().beginUpdate();try{q=m.importCells(q,g.x,g.y);n=[];for(f=0;f<q.length;f++)n.push(q[f]),n=n.concat(q[f].children);m.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
-m.scrollCellToVisible(m.getSelectionCell())}}}else{var v=function(b){var c=H[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,H[b]=c,q.push(c));return c},H={},q=[];for(f=0;f<e.length;f++)if(";"!=e[f].charAt(0)){var J=e[f].split("->");2<=J.length&&(u=v(J[0]),I=v(J[J.length-1]),J=new mxCell(2<J.length?J[1]:"",new mxGeometry),J.edge=!0,u.insertEdge(J,!0),I.insertEdge(J,!1),q.push(J))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
-document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{q=m.importCells(q);for(f=0;f<q.length;f++)m.getModel().isVertex(q[f])&&(n=m.getPreferredSizeForCell(q[f]),q[f].geometry.width=Math.max(q[f].geometry.width,n.width),q[f].geometry.height=Math.max(q[f].geometry.height,n.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
+g.x,g.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==c){if(0<e.length){m=b.editor.graph;v=null;q=[];for(c=p=0;c<e.length;c++)";"!=e[c].charAt(0)&&(0==e[c].length?v=null:null==v?(v=new mxCell(e[c],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),v.vertex=!0,q.push(v),n=m.getPreferredSizeForCell(v),null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=
+n.width+10),p+=v.geometry.width+40):"--"==e[c]?(n=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),n.vertex=!0,v.geometry.height+=n.geometry.height,v.insert(n)):0<e[c].length&&(t=new mxCell(e[c],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+t.vertex=!0,n=m.getPreferredSizeForCell(t),null!=n&&t.geometry.width<n.width&&(t.geometry.width=n.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){g=mxEvent.isAltDown(d)?g:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0));m.getModel().beginUpdate();try{q=m.importCells(q,g.x,g.y);n=[];for(c=0;c<q.length;c++)n.push(q[c]),n=n.concat(q[c].children);m.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
+m.scrollCellToVisible(m.getSelectionCell())}}}else{var v=function(b){var c=L[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,L[b]=c,q.push(c));return c},L={},q=[];for(c=0;c<e.length;c++)if(";"!=e[c].charAt(0)){var H=e[c].split("->");2<=H.length&&(u=v(H[0]),I=v(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,u.insertEdge(H,!0),I.insertEdge(H,!1),q.push(H))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
+document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{q=m.importCells(q);for(c=0;c<q.length;c++)m.getModel().isVertex(q[c])&&(n=m.getPreferredSizeForCell(q[c]),q[c].geometry.width=Math.max(q[c].geometry.width,n.width),q[c].geometry.height=Math.max(q[c].geometry.height,n.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
n=[];b.editor.graph.getModel().beginUpdate();try{q=m.getModel().getChildren(m.getDefaultParent()),g=mxEvent.isAltDown(d)?g:b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),n=b.editor.graph.importCells(q,g.x,g.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(n);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function k(){return"list"==
f.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==f.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==f.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":
"plantUmlPng"==f.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":"plantUmlSvg"==f.value||"plantUmlTxt"==f.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
@@ -10005,51 +10006,51 @@ null!=d&&"fromText"!=d||l.setAttribute("selected","selected");l=document.createE
mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&l.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var p=document.createElement("option");p.setAttribute("value",
"plantUmlTxt");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==d&&(f.appendChild(l),f.appendChild(m),f.appendChild(p));var q=k();n.value=q;e.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),n.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
b.dataTransfer.files[0];var c=new FileReader;c.onload=function(b){n.value=b.target.result};c.readAsText(b)}},!1));e.appendChild(f);mxEvent.addListener(f,"change",function(){var b=k();if(0==n.value.length||n.value==q)q=b,n.value=q});b.isOffline()||"mermaid"!=d&&"plantUml"!=d||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==d?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("close"),
-function(){n.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);m=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(n.value,f.value,d)});e.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,k,g,n,f,l,m,p,q,t,u,v,x,A,z){function y(b){null!=b&&(pa=W=b?135:140);b=!0;if(null!=na)for(;M<na.length&&(b||
-0!=mxUtils.mod(M,30));){var c=na[M++],c=D(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function B(){if(ba&&null!=u)d||b.hideDialog(),u(ba,ma,J.value);else if(c)d||b.hideDialog(),c(aa,J.value,fa,oa);else{var f=J.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,aa,null!=oa&&0<oa.length?oa:null,null,function(){b.hideDialog()},null,c,null,null!=ea&&0<ea.length?ea:null)},b.mode!=App.MODE_GOOGLE||
-null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,g,k){null!=la&&(la.style.backgroundColor="transparent",la.style.border="1px solid transparent");T.removeAttribute("disabled");aa=c;oa=d;ea=g;la=b;ba=e;fa=k;ma=m;la.style.backgroundColor=f;la.style.border=l}function D(c,f,d,e,l,m,g,k,p,q,t){function n(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
+function(){n.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);m=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(n.value,f.value,d)});e.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,k,g,n,f,l,m,p,q,t,u,v,x,A,z){function y(b){null!=b&&(ra=W=b?135:140);b=!0;if(null!=ha)for(;M<ha.length&&(b||
+0!=mxUtils.mod(M,30));){var c=ha[M++],c=E(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function B(){if(qa&&null!=u)d||b.hideDialog(),u(qa,oa,H.value);else if(c)d||b.hideDialog(),c(ca,H.value,Y,ka);else{var f=H.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,ca,null!=ka&&0<ka.length?ka:null,null,function(){b.hideDialog()},null,c,null,null!=aa&&0<aa.length?aa:null)},b.mode!=App.MODE_GOOGLE||
+null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,g,k){null!=la&&(la.style.backgroundColor="transparent",la.style.border="1px solid transparent");P.removeAttribute("disabled");ca=c;ka=d;aa=g;la=b;qa=e;Y=k;oa=m;la.style.backgroundColor=f;la.style.border=l}function E(c,f,d,e,l,m,g,k,p,q,t){function n(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
b.getStatus()&&299>=b.getStatus()&&(v=b.getText());f(v)}))}else f(v)}function y(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,u)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var m=new mxCodec(f.ownerDocument),k=new mxGraphModel;m.decode(f,k);f=k.root.getChildAt(0).children;b.sidebar.createTooltip(u,f,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
-document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){F=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,g,t)},!0)}}function L(f,d){null==c||K||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,K=!0,n(c,function(c){K&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));K=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
-"relative";u.style.height=pa+"px";u.style.width=W+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var K=!1;if(null!=m){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",m);l.setAttribute("alt",e);l.style.maxWidth=pa+"px";l.style.maxHeight=W+"px";var x=m.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=x?this.src=x:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g,t)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var A=function(b){T.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";P.spin(O);n(c,function(c){P.stop();null!=
-c&&(C(u,c,f,null,null,t,ra),b&&B())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
-(pa-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){A()}),null,null);mxEvent.addListener(u,"dblclick",function(b){A(!0);mxEvent.consume(b)})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(pa-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g)}),null,null),null!=k?mxEvent.addListener(u,"click",k):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,g)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var R=document.createElement("img");R.setAttribute("src",Sidebar.prototype.searchImage);R.setAttribute("title",mxResources.get("preview"));
-R.className="geActiveButton";R.style.position="absolute";R.style.cursor="default";R.style.padding="8px";R.style.right="0px";R.style.top="0px";u.appendChild(R);var F=!1;mxEvent.addGestureListeners(R,mxUtils.bind(this,function(c){F=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(R,"click",mxUtils.bind(this,function(b){F||L(b,R);mxEvent.consume(b)}))}O.appendChild(u);return u}function G(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
-f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){ka!=c&&(ka.style.backgroundColor="",ka=c,ka.style.backgroundColor=n,O.scrollTop=0,O.innerHTML="",M=0,na=f?ha[b][f]:ca[b],R=null,y(!1))})}ua&&(ua=!1,mxEvent.addListener(O,"scroll",function(b){O.scrollTop+O.clientHeight>=O.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<da){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
-mxUtils.write(f,mxResources.get("custom"));ga.appendChild(f);for(var d in Q){var e=document.createElement("div"),l=d,f=Q[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=m&&(e.style.padding=m);ga.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
-function(){ka!=c&&(ka.style.backgroundColor="",ka=c,ka.style.backgroundColor=n,O.scrollTop=0,O.innerHTML="",M=0,na=Q[b],R=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ga.appendChild(f)}for(d in ca){var l=ha[d],g=e=document.createElement(l?"ul":"div"),f=ca[d],k=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
-q.setAttribute("title",k);mxUtils.write(q,k);g=q;p.appendChild(q);k=document.createElement("ul");k.className="geTempTreeNested";k.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),L=b(t,l[t]);u.setAttribute("title",L);mxUtils.write(u,L);c(d,u,t);k.appendChild(u)}p.appendChild(k);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
-setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(k,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",k),mxUtils.write(e,k);null!=m&&(e.style.padding=m);ga.appendChild(e);null==ka&&0<f.length&&(ka=e,ka.style.backgroundColor=n,na=f);c(d,g)}y(!1)}var E=500>(window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth);d=null!=d?d:!0;k=null!=k?k:!1;n=null!=n?n:"#ebf2f9";f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var F=document.createElement("div");F.style.userSelect="none";F.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="46px";d&&F.appendChild(I);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align",
-"absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":
-b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||E||!d||I.appendChild(H);d&&mxUtils.write(I,(E?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==
-App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_NOTION&&null!=b.notion?H=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var J=document.createElement("input");J.setAttribute("value",b.defaultFilename+H);J.style.marginLeft="10px";J.style.width=e||E?"144px":"244px";this.init=function(){d&&(J.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",
-!1,null));null!=O.parentNode&&null!=O.parentNode.parentNode&&mxEvent.addGestureListeners(O.parentNode.parentNode,mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(I.appendChild(J),z?J.style.width=e||E?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e||E?"80px":"180px",I.appendChild(z)),null!=b.editor.fileExtensions&&(E=FilenameDialog.createTypeHint(b,J,b.editor.fileExtensions),
-E.style.marginTop="12px",I.appendChild(E))));var I=!1,M=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),T=mxUtils.button(x||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");B();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn";if(q||t){var L=[],R=null,K=null,S=null,N=function(b){T.setAttribute("disabled","disabled");for(var c=0;c<L.length;c++)L[c].className=c==b?"geBtn gePrimaryBtn":
-"geBtn"},I=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";F.appendChild(x);E=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ga.style.display="";U.style.display="";O.style.left="160px";N(0);O.scrollTop=0;O.innerHTML="";M=0;R!=na&&(na=R,ca=K,da=S,ga.innerHTML="",G(),R=null)});L.push(E);x.appendChild(E);var Y=function(b){ga.style.display="none";U.style.display="none";O.style.left="30px";N(b?-1:1);null==R&&(R=na);O.scrollTop=0;O.innerHTML=
-"";P.spin(O);var c=function(b,c,f){M=0;P.stop();na=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)O.innerHTML=c;else if(0==b.length&&0==d)O.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(O.innerHTML="",0<d){ga.style.display="";O.style.left="160px";ga.innerHTML="";da=0;ca={"draw.io":b};for(e in f)ca[e]=f[e];G()}else y(!0)};b?t(Z.value,c):q(c)};q&&(E=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),x.appendChild(E),L.push(E));
-if(t){E=document.createElement("span");E.style.marginLeft="10px";E.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(E);var Z=document.createElement("input");Z.style.marginRight="10px";Z.style.marginLeft="10px";Z.style.width="220px";mxEvent.addListener(Z,"keypress",function(b){13==b.keyCode&&Y(!0)});x.appendChild(Z);E=mxUtils.button(mxResources.get("search"),function(){Y(!0)});E.className="geBtn";x.appendChild(E)}N(0)}var oa=null,ea=null,aa=null,la=null,ba=null,fa=null,ma=
-null,O=document.createElement("div");O.style.border="1px solid #d3d3d3";O.style.position="absolute";O.style.left="160px";O.style.right="34px";x=(d?72:40)+(I?30:0);O.style.top=x+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var U=document.createElement("div");U.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var X=document.createElement("input");X.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";
-X.setAttribute("placeholder",mxResources.get("search"));X.setAttribute("type","text");U.appendChild(X);var V=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";V.setAttribute("src",ja);V.setAttribute("title",mxResources.get("search"));V.style.position="relative";V.style.left="-18px";V.style.top="1px";V.style.background="url('"+b.editor.transparentImage+"')";U.appendChild(V);mxEvent.addListener(V,"click",function(){V.getAttribute("src")==
-Dialog.prototype.closeImage&&(V.setAttribute("src",ja),V.setAttribute("title",mxResources.get("search")),X.value="",null!=ia&&(ia.click(),ia=null));X.focus()});mxEvent.addListener(X,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=X.value;if(""==c)null!=ia&&(ia.click(),ia=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in ca)for(var e=ca[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var k=m.tags.toLowerCase().split(";"),g=0;g<k.length;g++)null==f[k[g]]&&(f[k[g]]=
-[]),f[k[g]].push(m)}NewDialog.tagsList[p]=f}var q=c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<da&&null==f.__tagsList__){for(d in Q)for(e=Q[d],l=0;l<e.length;l++)for(m=e[l],k=m.title.split(" "),k.push(d),g=0;g<k.length;g++){var t=k[g].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(m)}f.__tagsList__=!0}d=[];e={};for(l=k=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],n={};d=[];if(null!=t)for(g=0;g<t.length;g++)m=t[g],0==k==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;k++}O.scrollTop=0;
-O.innerHTML="";M=0;f=document.createElement("div");f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));O.appendChild(f);null!=ka&&null==ia&&(ka.style.backgroundColor="",ia=ka,ka=f);na=d;R=null;y(!1)}mxEvent.consume(b)}}));mxEvent.addListener(X,"keyup",mxUtils.bind(this,function(b){""==X.value?(V.setAttribute("src",ja),V.setAttribute("title",mxResources.get("search"))):(V.setAttribute("src",Dialog.prototype.closeImage),
-V.setAttribute("title",mxResources.get("reset")))}));x+=23;var ga=document.createElement("div");ga.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(O,"scroll",function(){b.sidebar.hideTooltip()});var pa=140,W=140,ca={},ha={},Q={},da=0,ua=!0,ka=null,ia=null;ca.basic=[{title:"blankDiagram",select:!0}];var na=ca.basic;if(!e){var ta=function(){mxUtils.get(ra,function(b){if(!qa){qa=!0;b=b.getXml().documentElement.firstChild;
-for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=ca[d];null==l&&
-(l=[],ca[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ha[d],null==l&&(l={},ha[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}P.stop();G()}})};F.appendChild(U);F.appendChild(ga);F.appendChild(O);var qa=!1,ra=p;/^https?:\/\//.test(ra)&&!b.editor.isCorsEnabledForUrl(ra)&&
-(ra=PROXY_URL+"?url="+encodeURIComponent(ra));P.spin(O);null!=A?A(function(b,c){Q=b;S=da=c;ta()},ta):ta();K=ca}mxEvent.addListener(J,"keypress",function(c){b.dialog.container.firstChild==F&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||k||(x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-x.className="geBtn",A.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||k&&null==g||A.appendChild(x);e||"1"==urlParams.embed||k||mxClient.IS_ANDROID||mxClient.IS_IOS||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(J.value)+
-"&create="+encodeURIComponent(c)),null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=
-""});c.style.display="none";document.body.appendChild(c);b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(T);b.editor.cancelFirst||null!=c||k&&null==g||A.appendChild(x);F.appendChild(A);this.container=F};NewDialog.tagsList={};
+document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){U=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,g,t)},!0)}}function J(f,d){null==c||K||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,K=!0,n(c,function(c){K&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));K=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
+"relative";u.style.height=ra+"px";u.style.width=W+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var K=!1;if(null!=m){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",m);l.setAttribute("alt",e);l.style.maxWidth=ra+"px";l.style.maxHeight=W+"px";var x=m.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=x?this.src=x:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g,t)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var A=function(b){P.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";T.spin(R);n(c,function(c){T.stop();null!=
+c&&(C(u,c,f,null,null,t,ta),b&&B())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
+(ra-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){A()}),null,null);mxEvent.addListener(u,"dblclick",function(b){A(!0);mxEvent.consume(b)})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
+(ra-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g)}),null,null),null!=k?mxEvent.addListener(u,"click",k):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,g)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var F=document.createElement("img");F.setAttribute("src",Sidebar.prototype.searchImage);F.setAttribute("title",mxResources.get("preview"));
+F.className="geActiveButton";F.style.position="absolute";F.style.cursor="default";F.style.padding="8px";F.style.right="0px";F.style.top="0px";u.appendChild(F);var U=!1;mxEvent.addGestureListeners(F,mxUtils.bind(this,function(c){U=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(F,"click",mxUtils.bind(this,function(b){U||J(b,F);mxEvent.consume(b)}))}R.appendChild(u);return u}function D(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
+f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){ma!=c&&(ma.style.backgroundColor="",ma=c,ma.style.backgroundColor=n,R.scrollTop=0,R.innerHTML="",M=0,ha=f?da[b][f]:ba[b],U=null,y(!1))})}ga&&(ga=!1,mxEvent.addListener(R,"scroll",function(b){R.scrollTop+R.clientHeight>=R.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<S){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
+mxUtils.write(f,mxResources.get("custom"));ea.appendChild(f);for(var d in ia){var e=document.createElement("div"),l=d,f=ia[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=m&&(e.style.padding=m);ea.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
+function(){ma!=c&&(ma.style.backgroundColor="",ma=c,ma.style.backgroundColor=n,R.scrollTop=0,R.innerHTML="",M=0,ha=ia[b],U=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ea.appendChild(f)}for(d in ba){var l=da[d],g=e=document.createElement(l?"ul":"div"),f=ba[d],k=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
+q.setAttribute("title",k);mxUtils.write(q,k);g=q;p.appendChild(q);k=document.createElement("ul");k.className="geTempTreeNested";k.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),J=b(t,l[t]);u.setAttribute("title",J);mxUtils.write(u,J);c(d,u,t);k.appendChild(u)}p.appendChild(k);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
+setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(k,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",k),mxUtils.write(e,k);null!=m&&(e.style.padding=m);ea.appendChild(e);null==ma&&0<f.length&&(ma=e,ma.style.backgroundColor=n,ha=f);c(d,g)}y(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth);d=null!=d?d:!0;k=null!=k?k:!1;n=null!=n?n:"#ebf2f9";f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var F=document.createElement("div");F.style.userSelect="none";F.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="46px";d&&F.appendChild(I);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align",
+"absmiddle");L.style.width="40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":
+b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||G||!d||I.appendChild(L);d&&mxUtils.write(I,(G?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");L=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?L=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?L=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?L=b.oneDrive.extension:b.mode==
+App.MODE_GITHUB&&null!=b.gitHub?L=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?L=b.gitLab.extension:b.mode==App.MODE_NOTION&&null!=b.notion?L=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(L=b.trello.extension);var H=document.createElement("input");H.setAttribute("value",b.defaultFilename+L);H.style.marginLeft="10px";H.style.width=e||G?"144px":"244px";this.init=function(){d&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",
+!1,null));null!=R.parentNode&&null!=R.parentNode.parentNode&&mxEvent.addGestureListeners(R.parentNode.parentNode,mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(I.appendChild(H),z?H.style.width=e||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,H,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e||G?"80px":"180px",I.appendChild(z)),null!=b.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(b,H,b.editor.fileExtensions),
+G.style.marginTop="12px",I.appendChild(G))));var I=!1,M=0,T=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),P=mxUtils.button(x||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");B();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";if(q||t){var J=[],U=null,K=null,N=null,O=function(b){P.setAttribute("disabled","disabled");for(var c=0;c<J.length;c++)J[c].className=c==b?"geBtn gePrimaryBtn":
+"geBtn"},I=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";F.appendChild(x);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ea.style.display="";V.style.display="";R.style.left="160px";O(0);R.scrollTop=0;R.innerHTML="";M=0;U!=ha&&(ha=U,ba=K,S=N,ea.innerHTML="",D(),U=null)});J.push(G);x.appendChild(G);var X=function(b){ea.style.display="none";V.style.display="none";R.style.left="30px";O(b?-1:1);null==U&&(U=ha);R.scrollTop=0;R.innerHTML=
+"";T.spin(R);var c=function(b,c,f){M=0;T.stop();ha=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)R.innerHTML=c;else if(0==b.length&&0==d)R.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(R.innerHTML="",0<d){ea.style.display="";R.style.left="160px";ea.innerHTML="";S=0;ba={"draw.io":b};for(e in f)ba[e]=f[e];D()}else y(!0)};b?t(Z.value,c):q(c)};q&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){X()}),x.appendChild(G),J.push(G));
+if(t){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(G);var Z=document.createElement("input");Z.style.marginRight="10px";Z.style.marginLeft="10px";Z.style.width="220px";mxEvent.addListener(Z,"keypress",function(b){13==b.keyCode&&X(!0)});x.appendChild(Z);G=mxUtils.button(mxResources.get("search"),function(){X(!0)});G.className="geBtn";x.appendChild(G)}O(0)}var ka=null,aa=null,ca=null,la=null,qa=null,Y=null,oa=
+null,R=document.createElement("div");R.style.border="1px solid #d3d3d3";R.style.position="absolute";R.style.left="160px";R.style.right="34px";x=(d?72:40)+(I?30:0);R.style.top=x+"px";R.style.bottom="68px";R.style.margin="6px 0 0 -1px";R.style.padding="6px";R.style.overflow="auto";var V=document.createElement("div");V.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var fa=document.createElement("input");fa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";
+fa.setAttribute("placeholder",mxResources.get("search"));fa.setAttribute("type","text");V.appendChild(fa);var Q=document.createElement("img"),ja="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";Q.setAttribute("src",ja);Q.setAttribute("title",mxResources.get("search"));Q.style.position="relative";Q.style.left="-18px";Q.style.top="1px";Q.style.background="url('"+b.editor.transparentImage+"')";V.appendChild(Q);mxEvent.addListener(Q,"click",function(){Q.getAttribute("src")==
+Dialog.prototype.closeImage&&(Q.setAttribute("src",ja),Q.setAttribute("title",mxResources.get("search")),fa.value="",null!=pa&&(pa.click(),pa=null));fa.focus()});mxEvent.addListener(fa,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=fa.value;if(""==c)null!=pa&&(pa.click(),pa=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in ba)for(var e=ba[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var k=m.tags.toLowerCase().split(";"),g=0;g<k.length;g++)null==f[k[g]]&&(f[k[g]]=
+[]),f[k[g]].push(m)}NewDialog.tagsList[p]=f}var q=c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<S&&null==f.__tagsList__){for(d in ia)for(e=ia[d],l=0;l<e.length;l++)for(m=e[l],k=m.title.split(" "),k.push(d),g=0;g<k.length;g++){var t=k[g].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(m)}f.__tagsList__=!0}d=[];e={};for(l=k=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],n={};d=[];if(null!=t)for(g=0;g<t.length;g++)m=t[g],0==k==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;k++}R.scrollTop=0;
+R.innerHTML="";M=0;f=document.createElement("div");f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));R.appendChild(f);null!=ma&&null==pa&&(ma.style.backgroundColor="",pa=ma,ma=f);ha=d;U=null;y(!1)}mxEvent.consume(b)}}));mxEvent.addListener(fa,"keyup",mxUtils.bind(this,function(b){""==fa.value?(Q.setAttribute("src",ja),Q.setAttribute("title",mxResources.get("search"))):(Q.setAttribute("src",
+Dialog.prototype.closeImage),Q.setAttribute("title",mxResources.get("reset")))}));x+=23;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(R,"scroll",function(){b.sidebar.hideTooltip()});var ra=140,W=140,ba={},da={},ia={},S=0,ga=!0,ma=null,pa=null;ba.basic=[{title:"blankDiagram",select:!0}];var ha=ba.basic;if(!e){var sa=function(){mxUtils.get(ta,function(b){if(!na){na=
+!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<
+m&&(f=e.substring(l+1,m))}l=ba[d];null==l&&(l=[],ba[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=da[d],null==l&&(l={},da[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}T.stop();D()}})};F.appendChild(V);F.appendChild(ea);F.appendChild(R);var na=
+!1,ta=p;/^https?:\/\//.test(ta)&&!b.editor.isCorsEnabledForUrl(ta)&&(ta=PROXY_URL+"?url="+encodeURIComponent(ta));T.spin(R);null!=A?A(function(b,c){ia=b;N=S=c;sa()},sa):sa();K=ba}mxEvent.addListener(H,"keypress",function(c){b.dialog.container.firstChild==F&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||k||(x=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",A.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||k&&null==g||A.appendChild(x);e||"1"==urlParams.embed||k||mxClient.IS_ANDROID||mxClient.IS_IOS||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&
+(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(c)),null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type",
+"file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=""});c.style.display="none";document.body.appendChild(c);b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(P);b.editor.cancelFirst||null!=c||k&&null==g||A.appendChild(x);F.appendChild(A);this.container=F};NewDialog.tagsList={};
var CreateDialog=function(b,e,d,c,k,g,n,f,l,m,p,q,t,u,v,x,A){function z(c,f,d,l){function m(){mxEvent.addListener(g,"click",function(){var c=d;if(n){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:F.value,m="";c==App.MODE_GOOGLE?m=b.drive.extension:c==App.MODE_GITHUB?m=b.gitHub.extension:c==App.MODE_GITLAB?m=b.gitLab.extension:c==App.MODE_NOTION?m=b.notion.extension:c==App.MODE_TRELLO?m=b.trello.extension:c==App.MODE_DROPBOX?m=b.dropbox.extension:c==App.MODE_ONEDRIVE?
m=b.oneDrive.extension:c==App.MODE_DEVICE&&(m=".drawio");0<=l&&(f=f.substring(0,l));C.value=f+m}}y(d)})}var g=document.createElement("a");g.style.overflow="hidden";var k=document.createElement("img");k.src=c;k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace=
"nowrap";g.appendChild(k);g.style.color="gray";g.style.fontSize="11px";var p=document.createElement("div");g.appendChild(p);mxUtils.write(p,f);if(null!=l&&null==b[l]){k.style.visibility="hidden";mxUtils.setOpacity(p,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(g);var u=window.setTimeout(function(){null==b[l]&&(t.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();G.appendChild(g);++E==q&&(mxUtils.br(G),E=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}p="1"==urlParams.noDevice?!1:p;n=null!=n?n:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;g=document.createElement("div");g.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(g);var B=document.createElement("h2");mxUtils.write(B,k||mxResources.get("create"));
+function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();D.appendChild(g);++G==q&&(mxUtils.br(D),G=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}p="1"==urlParams.noDevice?!1:p;n=null!=n?n:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;g=document.createElement("div");g.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(g);var B=document.createElement("h2");mxUtils.write(B,k||mxResources.get("create"));
B.style.marginTop="0px";B.style.marginBottom="24px";g.appendChild(B);mxUtils.write(g,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};g.appendChild(C);null!=x&&(null!=b.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(b,
-C,b.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",g.appendChild(k)),g.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";k=document.createElement("img");var D=v?t:btoa(unescape(encodeURIComponent(t)));k.setAttribute("src","data:"+u+";base64,"+D);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");g.appendChild(k);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(D,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
-x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(g);var G=document.createElement("div");G.style.textAlign="center";var E=0;G.style.marginTop="6px";g.appendChild(G);var F=document.createElement("select");F.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
+C,b.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",g.appendChild(k)),g.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";k=document.createElement("img");var E=v?t:btoa(unescape(encodeURIComponent(t)));k.setAttribute("src","data:"+u+";base64,"+E);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");g.appendChild(k);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(E,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
+x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(g);var D=document.createElement("div");D.style.textAlign="center";var G=0;D.style.marginTop="6px";g.appendChild(D);var F=document.createElement("select");F.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),F.appendChild(t),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(t,mxResources.get("oneDrive")),F.appendChild(t),b.mode==App.MODE_ONEDRIVE&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(t,mxResources.get("dropbox")),F.appendChild(t),b.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),F.appendChild(t),z(IMAGE_PATH+
"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),F.appendChild(t),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=b.notion&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_NOTION),mxUtils.write(t,mxResources.get("notion")),F.appendChild(t),z(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
@@ -10093,57 +10094,57 @@ f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.ad
var RevisionDialog=function(b,e,d){var c=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));c.appendChild(k);k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.left="199px";g.style.width="470px";g.style.height="376px";
g.style.overflow="hidden";var n=document.createElement("div");n.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";g.appendChild(n);mxEvent.disableContextMenu(g);c.appendChild(g);var f=new Graph(g);f.setTooltips(!1);f.setEnabled(!1);f.setPanning(!0);f.panningHandler.ignoreCell=!0;f.panningHandler.useLeftButtonForPanning=!0;f.minFitScale=null;f.maxFitScale=null;f.centerZoom=!0;var l=0,m=null,p=0,q=f.getGlobalVariable;
f.getGlobalVariable=function(b){return"page"==b&&null!=m&&null!=m[p]?m[p].getAttribute("name"):"pagenumber"==b?p+1:"pagecount"==b?null!=m?m.length:1:q.apply(this,arguments)};f.getLinkForCell=function(){return null};Editor.MathJaxRender&&f.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,d){b.editor.graph.mathEnabled&&Editor.MathJaxRender(f.container)}));for(var t={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),x=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={},t=0;t<x.length;t++)A[x[t].getAttribute("id")]=x[t];var z=null,y=null,B=null,C=null,D=mxUtils.button("",function(){null!=B&&f.zoomIn()});D.className="geSprite geSprite-zoomin";D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");
-mxUtils.setOpacity(D,20);var G=mxUtils.button("",function(){null!=B&&f.zoomOut()});G.className="geSprite geSprite-zoomout";G.setAttribute("title",mxResources.get("zoomOut"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var E=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});E.className="geSprite geSprite-fit";E.setAttribute("title",mxResources.get("fit"));E.style.outline="none";E.style.border=
-"none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var F=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var I=mxUtils.button("",function(){});I.className="geSprite geSprite-middle";I.setAttribute("title",mxResources.get("compare"));
-I.style.outline="none";I.style.border="none";I.style.margin="2px";mxUtils.setOpacity(I,60);var H=g.cloneNode(!1);H.style.pointerEvent="none";g.parentNode.appendChild(H);var J=new Graph(H);J.setTooltips(!1);J.setEnabled(!1);J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;mxEvent.addGestureListeners(I,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(I,20);n.innerHTML="";null==b?mxUtils.write(n,
-mxResources.get("pageNotFound")):(M.style.display="none",g.style.display="none",H.style.display="",H.style.backgroundColor=g.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,J.getModel()),J.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(I,60);n.innerHTML="";"none"==g.style.display&&(M.style.display="",g.style.display="",H.style.display="none")});var M=document.createElement("div");M.style.position=
-"absolute";M.style.textAlign="right";M.style.color="gray";M.style.marginTop="10px";M.style.backgroundColor="transparent";M.style.top="440px";M.style.right="32px";M.style.maxWidth="380px";M.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=B){var c=mxUtils.getXml(B.documentElement),f=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(Graph.compress(c)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+c)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(c){null!=B&&null!=C&&(mxEvent.isShiftDown(c)?null!=B&&(c=b.getPagesForNode(B.documentElement),c=b.diffPages(b.pages,c),c=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(c,null,2),function(c){if(0<c.length)try{b.confirm(mxResources.get("areYouSure"),function(){v.patch([JSON.parse(c)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(fa){b.handleError(fa)}},null,null,null,null,null,!0,null,mxResources.get("merge")),c.textarea.style.width="600px",c.textarea.style.height="380px",b.showDialog(c.container,620,460,!0,!0),c.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=d?d(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(c){b.spinner.stop();b.replaceFileData(C);b.hideDialog()},function(c){b.spinner.stop();b.editor.setStatus("");b.handleError(c,
-null!=c?mxResources.get("errorSavingFile"):null)})}))});T.className="geBtn";T.setAttribute("disabled","disabled");T.setAttribute("title","Shift+Click for Diff");var L=document.createElement("select");L.setAttribute("disabled","disabled");L.style.maxWidth="80px";L.style.position="relative";L.style.top="-2px";L.style.verticalAlign="bottom";L.style.marginRight="6px";L.style.display="none";var R=null;mxEvent.addListener(L,"change",function(b){null!=R&&(R(b),mxEvent.consume(b))});var K=mxUtils.button(mxResources.get("edit"),
-function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=d&&(K.style.display="none");var S=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(L.selectedIndex))});S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");null!=d&&(S.style.display="none",T.className="geBtn gePrimaryBtn");
-x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var N=document.createElement("div");N.className="geToolbarContainer";N.style.backgroundColor="transparent";N.style.padding="2px";N.style.border="none";N.style.left="199px";N.style.top="442px";var Y=null;if(null!=e&&0<e.length){g.style.cursor="move";var Z=document.createElement("table");Z.style.border="1px solid lightGray";Z.style.borderCollapse="collapse";Z.style.borderSpacing=
-"0px";Z.style.width="100%";var oa=document.createElement("tbody"),ea=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var aa=function(c){var d=new Date(c.modifiedDate),k=null;if(0<=d.getTime()){var q=function(e){u.stop();n.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
-if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;g.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};L.style.display="none";L.innerHTML="";B=q;C=e;m=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");m=[];for(e=0;e<q.length;e++)m.push(q[e]);p=Math.min(l,m.length-1);0<m.length&&y(m[p]);if(1<m.length)for(L.removeAttribute("disabled"),L.style.display="",e=0;e<m.length;e++)q=
-document.createElement("option"),mxUtils.write(q,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),L.appendChild(q);R=function(){try{var c=parseInt(L.value);p=l=c;y(m[c])}catch(W){L.value=l,b.handleError(W)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");M.innerHTML="";mxUtils.write(M,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());M.setAttribute("title",
-k.getAttribute("title"));D.removeAttribute("disabled");G.removeAttribute("disabled");E.removeAttribute("disabled");F.removeAttribute("disabled");I.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),P.removeAttribute("disabled"),S.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(I,60)}else L.style.display="none",
-L.innerHTML="",M.innerHTML="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(n,mxResources.get("errorLoadingFile"))},k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===ea?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),x=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={},t=0;t<x.length;t++)A[x[t].getAttribute("id")]=x[t];var z=null,y=null,B=null,C=null,E=mxUtils.button("",function(){null!=B&&f.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
+mxUtils.setOpacity(E,20);var D=mxUtils.button("",function(){null!=B&&f.zoomOut()});D.className="geSprite geSprite-zoomout";D.setAttribute("title",mxResources.get("zoomOut"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var G=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border=
+"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var F=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var I=mxUtils.button("",function(){});I.className="geSprite geSprite-middle";I.setAttribute("title",mxResources.get("compare"));
+I.style.outline="none";I.style.border="none";I.style.margin="2px";mxUtils.setOpacity(I,60);var L=g.cloneNode(!1);L.style.pointerEvent="none";g.parentNode.appendChild(L);var H=new Graph(L);H.setTooltips(!1);H.setEnabled(!1);H.setPanning(!0);H.panningHandler.ignoreCell=!0;H.panningHandler.useLeftButtonForPanning=!0;H.minFitScale=null;H.maxFitScale=null;H.centerZoom=!0;mxEvent.addGestureListeners(I,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(I,20);n.innerHTML="";null==b?mxUtils.write(n,
+mxResources.get("pageNotFound")):(M.style.display="none",g.style.display="none",L.style.display="",L.style.backgroundColor=g.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,H.getModel()),H.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(I,60);n.innerHTML="";"none"==g.style.display&&(M.style.display="",g.style.display="",L.style.display="none")});var M=document.createElement("div");M.style.position=
+"absolute";M.style.textAlign="right";M.style.color="gray";M.style.marginTop="10px";M.style.backgroundColor="transparent";M.style.top="440px";M.style.right="32px";M.style.maxWidth="380px";M.style.cursor="default";var T=mxUtils.button(mxResources.get("download"),function(){if(null!=B){var c=mxUtils.getXml(B.documentElement),f=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(Graph.compress(c)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+c)).simulate(document,"_blank"))}});T.className="geBtn";T.setAttribute("disabled","disabled");var P=mxUtils.button(mxResources.get("restore"),function(c){null!=B&&null!=C&&(mxEvent.isShiftDown(c)?null!=B&&(c=b.getPagesForNode(B.documentElement),c=b.diffPages(b.pages,c),c=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(c,null,2),function(c){if(0<c.length)try{b.confirm(mxResources.get("areYouSure"),function(){v.patch([JSON.parse(c)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),c.textarea.style.width="600px",c.textarea.style.height="380px",b.showDialog(c.container,620,460,!0,!0),c.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=d?d(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(c){b.spinner.stop();b.replaceFileData(C);b.hideDialog()},function(c){b.spinner.stop();b.editor.setStatus("");b.handleError(c,
+null!=c?mxResources.get("errorSavingFile"):null)})}))});P.className="geBtn";P.setAttribute("disabled","disabled");P.setAttribute("title","Shift+Click for Diff");var J=document.createElement("select");J.setAttribute("disabled","disabled");J.style.maxWidth="80px";J.style.position="relative";J.style.top="-2px";J.style.verticalAlign="bottom";J.style.marginRight="6px";J.style.display="none";var U=null;mxEvent.addListener(J,"change",function(b){null!=U&&(U(b),mxEvent.consume(b))});var K=mxUtils.button(mxResources.get("edit"),
+function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=d&&(K.style.display="none");var N=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(J.selectedIndex))});N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");null!=d&&(N.style.display="none",P.className="geBtn gePrimaryBtn");
+x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.padding="2px";O.style.border="none";O.style.left="199px";O.style.top="442px";var X=null;if(null!=e&&0<e.length){g.style.cursor="move";var Z=document.createElement("table");Z.style.border="1px solid lightGray";Z.style.borderCollapse="collapse";Z.style.borderSpacing=
+"0px";Z.style.width="100%";var ka=document.createElement("tbody"),aa=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var ca=function(c){var d=new Date(c.modifiedDate),k=null;if(0<=d.getTime()){var q=function(e){u.stop();n.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
+if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;g.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};J.style.display="none";J.innerHTML="";B=q;C=e;m=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");m=[];for(e=0;e<q.length;e++)m.push(q[e]);p=Math.min(l,m.length-1);0<m.length&&y(m[p]);if(1<m.length)for(J.removeAttribute("disabled"),J.style.display="",e=0;e<m.length;e++)q=
+document.createElement("option"),mxUtils.write(q,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),J.appendChild(q);U=function(){try{var c=parseInt(J.value);p=l=c;y(m[c])}catch(W){J.value=l,b.handleError(W)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");M.innerHTML="";mxUtils.write(M,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());M.setAttribute("title",
+k.getAttribute("title"));E.removeAttribute("disabled");D.removeAttribute("disabled");G.removeAttribute("disabled");F.removeAttribute("disabled");I.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),T.removeAttribute("disabled"),N.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(I,60)}else J.style.display="none",
+J.innerHTML="",M.innerHTML="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(n,mxResources.get("errorLoadingFile"))},k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===aa?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
" "+d.toLocaleTimeString());k.appendChild(t);k.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(k,"click",function(b){y!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),y=c,z=k,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=B=null,M.removeAttribute("title"),M.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
-"..."),g.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),
-mxUtils.setOpacity(G,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(I,20),u.spin(g),c.getXml(function(b){if(y==c)try{q(b)}catch(V){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+V.message)}},function(b){u.stop();L.style.display="none";L.innerHTML="";M.innerHTML="";mxUtils.write(M,mxResources.get("errorLoadingFile"));mxUtils.write(n,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(k,"dblclick",function(b){S.click();window.getSelection?
-window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);oa.appendChild(k)}return k}(e[t]);null!=aa&&t==e.length-1&&(Y=aa)}Z.appendChild(oa);k.appendChild(Z)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(g.style.display="none",N.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(g.style.display="none",N.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));
-this.init=function(){null!=Y&&Y.click()};k=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.className="geBtn";N.appendChild(L);N.appendChild(D);N.appendChild(G);N.appendChild(F);N.appendChild(E);N.appendChild(I);b.editor.cancelFirst?(x.appendChild(k),x.appendChild(P),x.appendChild(K),x.appendChild(T),x.appendChild(S)):(x.appendChild(P),x.appendChild(K),x.appendChild(T),x.appendChild(S),x.appendChild(k));c.appendChild(x);c.appendChild(N);c.appendChild(M);this.container=c},DraftDialog=
+"..."),g.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),P.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),
+mxUtils.setOpacity(D,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(I,20),u.spin(g),c.getXml(function(b){if(y==c)try{q(b)}catch(Q){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},function(b){u.stop();J.style.display="none";J.innerHTML="";M.innerHTML="";mxUtils.write(M,mxResources.get("errorLoadingFile"));mxUtils.write(n,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(k,"dblclick",function(b){N.click();window.getSelection?
+window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ka.appendChild(k)}return k}(e[t]);null!=ca&&t==e.length-1&&(X=ca)}Z.appendChild(ka);k.appendChild(Z)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(g.style.display="none",O.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(g.style.display="none",O.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));
+this.init=function(){null!=X&&X.click()};k=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.className="geBtn";O.appendChild(J);O.appendChild(E);O.appendChild(D);O.appendChild(F);O.appendChild(G);O.appendChild(I);b.editor.cancelFirst?(x.appendChild(k),x.appendChild(T),x.appendChild(K),x.appendChild(P),x.appendChild(N)):(x.appendChild(T),x.appendChild(K),x.appendChild(P),x.appendChild(N),x.appendChild(k));c.appendChild(x);c.appendChild(O);c.appendChild(M);this.container=c},DraftDialog=
function(b,e,d,c,k,g,n,f,l){var m=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);m.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){y=mxUtils.parseXml(l[q.value].data);B=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
u.setAttribute("value",e);var v=new Date(l[e].created),x=new Date(l[e].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());q.appendChild(u)}p.appendChild(q);mxEvent.addListener(q,"change",t)}null==d&&(d=l[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top=
-"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);m.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var y=mxUtils.parseXml(d),B=b.editor.extractGraphModel(y.documentElement,!0),C=0,D=null,G=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=D&&null!=D[C]?D[C].getAttribute("name"):"pagenumber"==
-b?C+1:"pagecount"==b?null!=D?D.length:1:G.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
+"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);m.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var y=mxUtils.parseXml(d),B=b.editor.extractGraphModel(y.documentElement,!0),C=0,E=null,D=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=E&&null!=E[C]?E[C].getAttribute("name"):"pagenumber"==
+b?C+1:"pagecount"==b?null!=E?E.length:1:D.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
"none";p.style.margin="2px";mxUtils.setOpacity(p,60);e=mxUtils.button("",function(){z.maxFitScale=8;z.fit(8);z.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);u=mxUtils.button("",function(){z.zoomActual();z.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin=
-"2px";mxUtils.setOpacity(u,60);n=mxUtils.button(n||mxResources.get("discard"),function(){k.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});n.className="geBtn";var E=document.createElement("select");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";
-E.style.display="none";g=mxUtils.button(g||mxResources.get("edit"),function(){c.apply(this,[q.value])});g.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
-b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(E,"change",function(b){C=parseInt(E.value);c(D[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");D=[];for(var d=0;d<f.length;d++)D.push(f[d]);
-0<D.length&&c(D[C]);E.innerHTML="";if(1<D.length)for(E.style.display="",d=0;d<D.length;d++)f=document.createElement("option"),mxUtils.write(f,D[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),E.appendChild(f);else E.style.display="none"}else b(B)};x.appendChild(E);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
+"2px";mxUtils.setOpacity(u,60);n=mxUtils.button(n||mxResources.get("discard"),function(){k.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});n.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";
+G.style.display="none";g=mxUtils.button(g||mxResources.get("edit"),function(){c.apply(this,[q.value])});g.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
+b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(G,"change",function(b){C=parseInt(G.value);c(E[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");E=[];for(var d=0;d<f.length;d++)E.push(f[d]);
+0<E.length&&c(E[C]);G.innerHTML="";if(1<E.length)for(G.style.display="",d=0;d<E.length;d++)f=document.createElement("option"),mxUtils.write(f,E[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),G.appendChild(f);else G.style.display="none"}else b(B)};x.appendChild(G);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
"geBtn";f=null!=f?mxUtils.button(mxResources.get("ignore"),f):null;null!=f&&(f.className="geBtn");b.editor.cancelFirst?(v.appendChild(d),null!=f&&v.appendChild(f),v.appendChild(n),v.appendChild(g)):(v.appendChild(g),v.appendChild(n),null!=f&&v.appendChild(f),v.appendChild(d));m.appendChild(v);m.appendChild(x);this.container=m},FindWindow=function(b,e,d,c,k,g){function n(b,c,f,d){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var e=0;e<c.length;e++)if("label"!=c[e].nodeName){var l=
-mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&D.value?(P.removeAttribute("disabled"),T.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));D.value&&C.value?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}function l(c,d,e){J.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
-k=C.value.toLowerCase(),y=G.checked?new RegExp(k):null,L=null;x=null;q!=k&&(q=k,t=null,v=!1);var B=null==t;if(0<k.length){if(v){v=!1;for(var K,R=0;R<b.pages.length;R++)if(b.currentPage==b.pages[R]){K=R;break}c=(K+1)%b.pages.length;t=null;do v=!1,m=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(m),p.model.setRoot(m.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=K);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,m)):b.selectPage(m));v=!1;p=b.editor.graph;return l(!0,
-d,e)}for(R=0;R<m.length;R++){K=p.view.getState(m[R]);d&&null!=y&&(B=B||K==t);if(null!=K&&null!=K.cell.value&&(B||null==L)&&(p.model.isVertex(K.cell)||p.model.isEdge(K.cell))){null!=K.style&&"1"==K.style.html?(F.innerHTML=p.sanitizeHtml(p.getLabel(K.cell)),label=mxUtils.extractTextWithWhitespace([F])):label=p.getLabel(K.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var N=0;d&&g&&null!=y&&K==t&&(label=label.substr(A),N=A);var z=""==D.value,S=z;if(null==y&&(S&&
-0<=label.indexOf(k)||!S&&label.substring(0,k.length)===k||z&&n(y,K.cell,k,S))||null!=y&&(y.test(label)||z&&n(y,K.cell,k,S)))if(g&&(null!=y?(z=label.match(y),x=z[0].toLowerCase(),A=N+z.index+x.length):(x=k,A=x.length)),B){L=K;break}else null==L&&(L=K)}B=B||K==t}}if(null!=L){if(R==m.length&&E.checked)return t=null,v=!0,l(!0,d,e);t=L;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
-E.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=L;g&&!c&&f();return 0==k.length||null!=L}var m=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,A=0,z=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=g?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
-C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var D;g&&(D=document.createElement("input"),D.setAttribute("placeholder",mxResources.get("replaceWith")),D.setAttribute("type","text"),D.style.marginTop="4px",D.style.marginBottom="6px",D.style.width=B,D.style.fontSize="12px",D.style.borderRadius="4px",D.style.padding="6px",y.appendChild(D),mxUtils.br(y),mxEvent.addListener(D,"input",f));var G=document.createElement("input");
-G.setAttribute("id","geFindWinRegExChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";y.appendChild(G);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);var E=document.createElement("input");E.setAttribute("id",
-"geFindWinAllPagesChck");E.setAttribute("type","checkbox");E.style.marginRight="4px";y.appendChild(E);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");y.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));y.appendChild(B);var F=document.createElement("div");mxUtils.br(y);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";y.appendChild(B);var I=mxUtils.button(mxResources.get("reset"),
-function(){J.innerHTML="";C.value="";C.style.backgroundColor="";g&&(D.value="",f());q=t=null;v=!1;C.focus()});I.setAttribute("title",mxResources.get("reset"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";g||B.appendChild(I);var H=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(K){b.handleError(K)}});
-H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";B.appendChild(H);var J=document.createElement("div");J.style.marginTop="10px";if(g){var M=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var m=
--1;-1<(m=b.indexOf("<",m+1));)e.push(m);m=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var k=0,g=0;g<e.length;g++){if(e[g]-k<d)b=b.substr(0,e[g])+m[g]+b.substr(e[g]);else{var p=e[g]-k<l?d+k:e[g]+(f.length-c.length);b=b.substr(0,p)+m[g]+b.substr(p)}k+=m[g].length}return b},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&D.value){var c=t.cell,f=p.getLabel(c);
-p.isCellEditable(c)&&p.model.setValue(c,M(f,x,D.value,A-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(N){b.handleError(N)}});P.setAttribute("title",mxResources.get("replFind"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");B.appendChild(P);mxUtils.br(B);
-var T=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&D.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,M(f,x,D.value,A-x.length,p.getCurrentCellStyle(c)));P.setAttribute("disabled","disabled");T.setAttribute("disabled","disabled")}}catch(N){b.handleError(N)}});T.setAttribute("title",mxResources.get("replace"));T.style["float"]="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";
-T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");B.appendChild(T);var L=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerHTML="";if(D.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var m=t.cell,k=p.getLabel(m),g=e[m.id];if(g&&g.replAllMrk==z&&g.replAllPos>=A)break;e[m.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(m)&&(p.model.setValue(m,M(k,x,D.value,
-A-x.length,p.getCurrentCellStyle(m))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(J,mxResources.get("matchesRepl",[d]))}catch(aa){b.handleError(aa)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});L.setAttribute("title",mxResources.get("replaceAll"));L.style["float"]="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";
-L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");B.appendChild(L);mxUtils.br(B);B.appendChild(I);I=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));I.setAttribute("title",mxResources.get("close"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";B.appendChild(I);mxUtils.br(B);B.appendChild(J)}else I.style.width=
-"90px",H.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)m.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(S){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});
-this.window=new mxWindow(mxResources.get("find")+(g?"/"+mxResources.get("replace"):""),y,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?E.removeAttribute("disabled"):
-(E.checked=!1,E.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
-var R=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",R);this.destroy=function(){mxEvent.removeListener(window,"resize",R);this.window.destroy()}},FreehandWindow=function(b,e,d,c,k){var g=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var n=mxUtils.button(mxResources.get("startDrawing"),function(){g.freehand.isDrawing()?
+mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&E.value?(T.removeAttribute("disabled"),P.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));E.value&&C.value?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}function l(c,d,e){H.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
+k=C.value.toLowerCase(),y=D.checked?new RegExp(k):null,J=null;x=null;q!=k&&(q=k,t=null,v=!1);var B=null==t;if(0<k.length){if(v){v=!1;for(var K,U=0;U<b.pages.length;U++)if(b.currentPage==b.pages[U]){K=U;break}c=(K+1)%b.pages.length;t=null;do v=!1,m=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(m),p.model.setRoot(m.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=K);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,m)):b.selectPage(m));v=!1;p=b.editor.graph;return l(!0,
+d,e)}for(U=0;U<m.length;U++){K=p.view.getState(m[U]);d&&null!=y&&(B=B||K==t);if(null!=K&&null!=K.cell.value&&(B||null==J)&&(p.model.isVertex(K.cell)||p.model.isEdge(K.cell))){null!=K.style&&"1"==K.style.html?(F.innerHTML=p.sanitizeHtml(p.getLabel(K.cell)),label=mxUtils.extractTextWithWhitespace([F])):label=p.getLabel(K.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var O=0;d&&g&&null!=y&&K==t&&(label=label.substr(A),O=A);var N=""==E.value,z=N;if(null==y&&(z&&
+0<=label.indexOf(k)||!z&&label.substring(0,k.length)===k||N&&n(y,K.cell,k,z))||null!=y&&(y.test(label)||N&&n(y,K.cell,k,z)))if(g&&(null!=y?(N=label.match(y),x=N[0].toLowerCase(),A=O+N.index+x.length):(x=k,A=x.length)),B){J=K;break}else null==J&&(J=K)}B=B||K==t}}if(null!=J){if(U==m.length&&G.checked)return t=null,v=!0,l(!0,d,e);t=J;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
+G.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=J;g&&!c&&f();return 0==k.length||null!=J}var m=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,A=0,z=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=g?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
+C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var E;g&&(E=document.createElement("input"),E.setAttribute("placeholder",mxResources.get("replaceWith")),E.setAttribute("type","text"),E.style.marginTop="4px",E.style.marginBottom="6px",E.style.width=B,E.style.fontSize="12px",E.style.borderRadius="4px",E.style.padding="6px",y.appendChild(E),mxUtils.br(y),mxEvent.addListener(E,"input",f));var D=document.createElement("input");
+D.setAttribute("id","geFindWinRegExChck");D.setAttribute("type","checkbox");D.style.marginRight="4px";y.appendChild(D);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);var G=document.createElement("input");G.setAttribute("id",
+"geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";y.appendChild(G);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");y.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));y.appendChild(B);var F=document.createElement("div");mxUtils.br(y);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";y.appendChild(B);var I=mxUtils.button(mxResources.get("reset"),
+function(){H.innerHTML="";C.value="";C.style.backgroundColor="";g&&(E.value="",f());q=t=null;v=!1;C.focus()});I.setAttribute("title",mxResources.get("reset"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";g||B.appendChild(I);var L=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(K){b.handleError(K)}});
+L.setAttribute("title",mxResources.get("find")+" (Enter)");L.style["float"]="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";B.appendChild(L);var H=document.createElement("div");H.style.marginTop="10px";if(g){var M=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var m=
+-1;-1<(m=b.indexOf("<",m+1));)e.push(m);m=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var k=0,g=0;g<e.length;g++){if(e[g]-k<d)b=b.substr(0,e[g])+m[g]+b.substr(e[g]);else{var p=e[g]-k<l?d+k:e[g]+(f.length-c.length);b=b.substr(0,p)+m[g]+b.substr(p)}k+=m[g].length}return b},T=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);
+p.isCellEditable(c)&&p.model.setValue(c,M(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(O){b.handleError(O)}});T.setAttribute("title",mxResources.get("replFind"));T.style["float"]="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");B.appendChild(T);mxUtils.br(B);
+var P=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,M(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));T.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(O){b.handleError(O)}});P.setAttribute("title",mxResources.get("replace"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";
+P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");B.appendChild(P);var J=mxUtils.button(mxResources.get("replaceAll"),function(){H.innerHTML="";if(E.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var m=t.cell,k=p.getLabel(m),g=e[m.id];if(g&&g.replAllMrk==z&&g.replAllPos>=A)break;e[m.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(m)&&(p.model.setValue(m,M(k,x,E.value,
+A-x.length,p.getCurrentCellStyle(m))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(H,mxResources.get("matchesRepl",[d]))}catch(ca){b.handleError(ca)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});J.setAttribute("title",mxResources.get("replaceAll"));J.style["float"]="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";
+J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");B.appendChild(J);mxUtils.br(B);B.appendChild(I);I=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));I.setAttribute("title",mxResources.get("close"));I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn";B.appendChild(I);mxUtils.br(B);B.appendChild(H)}else I.style.width=
+"90px",L.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)m.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(N){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});
+this.window=new mxWindow(mxResources.get("find")+(g?"/"+mxResources.get("replace"):""),y,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.removeAttribute("disabled"):
+(G.checked=!1,G.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
+var U=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",U);this.destroy=function(){mxEvent.removeListener(window,"resize",U);this.window.destroy()}},FreehandWindow=function(b,e,d,c,k){var g=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var n=mxUtils.button(mxResources.get("startDrawing"),function(){g.freehand.isDrawing()?
g.freehand.stopDrawing():g.freehand.startDrawing()});n.setAttribute("title",mxResources.get("startDrawing"));n.style.marginTop="10px";n.style.width="90%";n.style.boxSizing="border-box";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.style.textAlign="center";n.className="geBtn gePrimaryBtn";b.appendChild(n);this.window=new mxWindow(mxResources.get("freehand"),b,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
g.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.setAttribute("title",mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.className="geBtn"+(g.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){g.freehand.isDrawing()&&g.freehand.stopDrawing()}));
this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var f=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();
@@ -10184,28 +10185,28 @@ document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var
1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(z);f.appendChild(l);f.appendChild(m);n.appendChild(f);g.appendChild(n);k.appendChild(g);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,
0<mxUtils.trim(q.value).length&&(f.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(f.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(x.value).length&&(f.width=Number(x.value)),0<mxUtils.trim(A.value).length&&(f.height=Number(A.value))),d.getModel().setGeometry(e[c],f));0<mxUtils.trim(z.value).length&&
d.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[c]])}}finally{d.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&y.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";b.editor.cancelFirst?(g.appendChild(c),g.appendChild(y)):(g.appendChild(y),g.appendChild(c));k.appendChild(g);this.container=k},LibraryDialog=function(b,e,d,c,k,g){function n(b){for(b=document.elementFromPoint(b.clientX,
-b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,m,k,g,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=g||null==x[c]){var L=function(){H.innerHTML="";H.style.cursor="pointer";H.style.whiteSpace="nowrap";H.style.textOverflow="ellipsis";mxUtils.write(H,null!=J.title&&0<J.title.length?J.title:mxResources.get("untitled"));H.style.color=null==J.title||0==
-J.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var K=m,F=k;if(m>b.maxImageSize||k>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,k));m*=N;k*=N}K>F?(F=Math.round(100*F/K),K=100):(K=Math.round(100*K/F),F=100);var z=document.createElement("div");z.setAttribute("draggable","true");z.style.display="inline-block";z.style.position="relative";z.style.padding="0 12px";z.style.cursor="move";mxUtils.setPrefixedStyle(z.style,"transition",
-"transform .1s ease-in-out");if(null!=c){var E=document.createElement("img");E.setAttribute("src",B.convert(c));E.style.width=K+"px";E.style.height=F+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-F)/2)+"px";E.style.paddingLeft=Math.floor((100-K)/2)+"px";z.appendChild(E)}else if(null!=g){var M=b.stringToCells(Graph.decompress(g.xml));0<M.length&&(b.sidebar.createThumb(M,100,100,z,null,!0,!1),z.firstChild.style.display="inline-block",z.firstChild.style.cursor="")}var D=document.createElement("img");
-D.setAttribute("src",Editor.closeBlackImage);D.setAttribute("border","0");D.setAttribute("title",mxResources.get("delete"));D.setAttribute("align","top");D.style.paddingTop="4px";D.style.position="absolute";D.style.marginLeft="-12px";D.style.zIndex="1";D.style.cursor="pointer";mxEvent.addListener(D,"dragstart",function(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(D,"click",function(d){x[c]=null;for(var e=0;e<p.length;e++)if(null!=p[e].data&&p[e].data==c||null!=p[e].xml&&null!=f&&p[e].xml==
-f.xml){p.splice(e,1);break}z.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(D,"dblclick",function(b){mxEvent.consume(b)})})(z,c,g);z.appendChild(D);z.style.marginBottom="30px";var H=document.createElement("div");H.style.position="absolute";H.style.boxSizing="border-box";H.style.bottom="-18px";H.style.left="10px";H.style.right="10px";H.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":
-"#ffffff";H.style.overflow="hidden";H.style.textAlign="center";var J=null;null!=c?(J={data:c,w:m,h:k,title:t},null!=q&&(J.aspect=q),x[c]=E,p.push(J)):null!=g&&(g.aspect="fixed",p.push(g),J=g);mxEvent.addListener(H,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});L();z.appendChild(H);mxEvent.addListener(H,"mousedown",function(b){"true"!=H.getAttribute("contentEditable")&&mxEvent.consume(b)});M=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
-9<document.documentMode)){var f=new FilenameDialog(b,J.title||"",mxResources.get("ok"),function(b){null!=b&&(J.title=b,L())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=H.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==J.title||0==J.title.length)H.innerHTML="";H.style.textOverflow="";H.style.whiteSpace="";H.style.cursor="text";H.style.color="";H.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(H.style,
-"user-select","text");H.focus();document.execCommand("selectAll",!1,null);y=function(){H.removeAttribute("contentEditable");H.style.cursor="pointer";J.title=H.innerHTML;L()};mxEvent.consume(c)}};mxEvent.addListener(H,"click",M);mxEvent.addListener(z,"dblclick",M);u.appendChild(z);mxEvent.addListener(z,"dragstart",function(b){null==c&&null!=g&&(D.style.visibility="hidden",H.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&b.dataTransfer.setData("Text",g.xml);A=n(b);mxClient.IS_GC&&(z.style.opacity=
-"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(z.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(z,30);D.style.visibility="";H.style.visibility=""},0)});mxEvent.addListener(z,"dragend",function(b){"hidden"==D.style.visibility&&(D.style.visibility="",H.style.visibility="");A=null;mxUtils.setOpacity(z,100);mxUtils.setPrefixedStyle(z.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(K=mxUtils.parseXml(c),"mxlibrary"==
-K.documentElement.nodeName){F=JSON.parse(mxUtils.getTextContent(K.documentElement));if(null!=F&&0<F.length)for(var G=0;G<F.length;G++)null!=F[G].xml?f(null,null,0,0,0,0,F[G]):f(F[G].data,null,0,0,F[G].w,F[G].h,null,"fixed",F[G].title);m=!0}else if("mxfile"==K.documentElement.nodeName){for(var I=K.documentElement.getElementsByTagName("diagram"),G=0;G<I.length;G++){var F=mxUtils.getTextContent(I[G]),M=b.stringToCells(Graph.decompress(F)),P=b.editor.graph.getBoundingBoxFromGeometry(M);f(null,null,0,
-0,0,0,{xml:F,w:P.width,h:P.height})}m=!0}}catch(O){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(O){}return null}function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function m(c){c.stopPropagation();c.preventDefault();C=!1;z=n(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));
-else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,D(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");
+b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,m,k,g,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=g||null==x[c]){var J=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));D.style.color=null==L.title||0==
+L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var K=m,F=k;if(m>b.maxImageSize||k>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,k));m*=O;k*=O}K>F?(F=Math.round(100*F/K),K=100):(K=Math.round(100*K/F),F=100);var z=document.createElement("div");z.setAttribute("draggable","true");z.style.display="inline-block";z.style.position="relative";z.style.padding="0 12px";z.style.cursor="move";mxUtils.setPrefixedStyle(z.style,"transition",
+"transform .1s ease-in-out");if(null!=c){var G=document.createElement("img");G.setAttribute("src",B.convert(c));G.style.width=K+"px";G.style.height=F+"px";G.style.margin="10px";G.style.paddingBottom=Math.floor((100-F)/2)+"px";G.style.paddingLeft=Math.floor((100-K)/2)+"px";z.appendChild(G)}else if(null!=g){var M=b.stringToCells(Graph.decompress(g.xml));0<M.length&&(b.sidebar.createThumb(M,100,100,z,null,!0,!1),z.firstChild.style.display="inline-block",z.firstChild.style.cursor="")}var E=document.createElement("img");
+E.setAttribute("src",Editor.closeBlackImage);E.setAttribute("border","0");E.setAttribute("title",mxResources.get("delete"));E.setAttribute("align","top");E.style.paddingTop="4px";E.style.position="absolute";E.style.marginLeft="-12px";E.style.zIndex="1";E.style.cursor="pointer";mxEvent.addListener(E,"dragstart",function(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(E,"click",function(d){x[c]=null;for(var e=0;e<p.length;e++)if(null!=p[e].data&&p[e].data==c||null!=p[e].xml&&null!=f&&p[e].xml==
+f.xml){p.splice(e,1);break}z.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(E,"dblclick",function(b){mxEvent.consume(b)})})(z,c,g);z.appendChild(E);z.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var L=null;null!=c?(L={data:c,w:m,h:k,title:t},null!=q&&(L.aspect=q),x[c]=G,p.push(L)):null!=g&&(g.aspect="fixed",p.push(g),L=g);mxEvent.addListener(D,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});J();z.appendChild(D);mxEvent.addListener(D,"mousedown",function(b){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(b)});M=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
+9<document.documentMode)){var f=new FilenameDialog(b,L.title||"",mxResources.get("ok"),function(b){null!=b&&(L.title=b,J())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=D.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==L.title||0==L.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(D.style,
+"user-select","text");D.focus();document.execCommand("selectAll",!1,null);y=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";L.title=D.innerHTML;J()};mxEvent.consume(c)}};mxEvent.addListener(D,"click",M);mxEvent.addListener(z,"dblclick",M);u.appendChild(z);mxEvent.addListener(z,"dragstart",function(b){null==c&&null!=g&&(E.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&b.dataTransfer.setData("Text",g.xml);A=n(b);mxClient.IS_GC&&(z.style.opacity=
+"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(z.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(z,30);E.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(z,"dragend",function(b){"hidden"==E.style.visibility&&(E.style.visibility="",D.style.visibility="");A=null;mxUtils.setOpacity(z,100);mxUtils.setPrefixedStyle(z.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(K=mxUtils.parseXml(c),"mxlibrary"==
+K.documentElement.nodeName){F=JSON.parse(mxUtils.getTextContent(K.documentElement));if(null!=F&&0<F.length)for(var H=0;H<F.length;H++)null!=F[H].xml?f(null,null,0,0,0,0,F[H]):f(F[H].data,null,0,0,F[H].w,F[H].h,null,"fixed",F[H].title);m=!0}else if("mxfile"==K.documentElement.nodeName){for(var I=K.documentElement.getElementsByTagName("diagram"),H=0;H<I.length;H++){var F=mxUtils.getTextContent(I[H]),M=b.stringToCells(Graph.decompress(F)),T=b.editor.graph.getBoundingBoxFromGeometry(M);f(null,null,0,
+0,0,0,{xml:F,w:T.width,h:T.height})}m=!0}}catch(R){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}return null}function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function m(c){c.stopPropagation();c.preventDefault();C=!1;z=n(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));
+else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,E(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");
d.style.height="100%";var q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="40px";d.appendChild(q);mxUtils.write(q,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==k||k.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)};q.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==p.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");
v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var x={},A=null,z=null,y=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var B=new mxUrlConverter,C=
-!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var D=function(c){return function(d,e,l,m,k,g,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?
+!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var E=function(c){return function(d,e,l,m,k,g,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?
null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=t&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,t.name)?b.parseFile(t,mxUtils.bind(this,function(d){4==d.readyState&&(b.spinner.stop(),200<=d.status&&299>=d.status&&(f(d.responseText,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(f(d,e,l,m,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g,
" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);mxEvent.addListener(v,"dragover",l);mxEvent.addListener(v,"drop",m);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&
k.constructor!=GitHubLibrary||(q=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(c){b.spinner.stop();if(null!=c){var f=b.getSearch("create title mode url drive splash state clibs ui".split(" ")),f=f+((0==f.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(c));c=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+f,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(c.container,
440,240,!0);c.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),q.className="geBtn",c.appendChild(q));q=mxUtils.button(mxResources.get("export"),function(){var c=b.createLibraryDataFromImages(p),f=t.value;/(\.xml)$/i.test(f)||
-(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var G=document.createElement("input");G.setAttribute("multiple","multiple");G.setAttribute("type","file");mxEvent.addListener(G,"change",function(c){C=!1;
-b.importFiles(G.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,k,g,p){null!=G.files&&(D(c)(b,f,d,e,l,m,k,g,p),G.type="",G.type="file",G.value="")});u.scrollTop=u.scrollHeight});G.style.display="none";document.body.appendChild(G);b.libDlgFileInputElt=G}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
+(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",function(c){C=!1;
+b.importFiles(D.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,k,g,p){null!=D.files&&(E(c)(b,f,d,e,l,m,k,g,p),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);b.libDlgFileInputElt=D}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(b,c,d){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var e=b.indexOf(",");0<e&&(b=b.substring(0,e)+";base64,"+b.substring(e+1))}f(b,null,0,0,c,d);u.scrollTop=u.scrollHeight}})});q.setAttribute("id","btnAddImageUrl");q.className="geBtn";c.appendChild(q);this.saveBtnClickHandler=function(c,f,d,e){b.saveLibrary(c,f,d,e)};q=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(t.value,
p,k,g)}));q.setAttribute("id","btnSave");q.className="geBtn gePrimaryBtn";c.appendChild(q);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=d},EditShapeDialog=function(b,e,d,c,k){c=null!=c?c:300;k=null!=k?k:120;var g,n,f=document.createElement("table"),l=document.createElement("tbody");f.style.cellPadding="4px";g=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);g.appendChild(n);l.appendChild(g);
g=document.createElement("tr");n=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=c-200+"px";m.style.height=k+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};n.appendChild(m);g.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=k+4+"px";d.style.overflow="hidden";
@@ -10214,44 +10215,44 @@ n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowra
l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&b.hideDialog(),l=!c.model.contains(f),!d||l||e!=t){e=Graph.compress(e);c.getModel().beginUpdate();try{if(l){var k=b.editor.graph.getFreeInsertPoint();f.geometry.x=k.x;f.geometry.y=k.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(C){throw C;}finally{c.getModel().endUpdate()}l&&
(c.setSelectionCell(f),c.scrollCellToVisible(f))}};d=mxUtils.button(mxResources.get("preview"),function(){u(p,q,!1)});d.className="geBtn";n.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);b.editor.cancelFirst||n.appendChild(k);g.appendChild(n);l.appendChild(g);f.appendChild(l);this.container=f},CustomDialog=function(b,e,d,c,k,g,n,f,l,m){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");
e.style.marginTop="30px";e.style.textAlign="center";null!=n&&e.appendChild(n);b.isOffline()||null==g||(n=mxUtils.button(mxResources.get("help"),function(){b.openLink(g)}),n.className="geBtn",e.appendChild(n));l=mxUtils.button(l||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});l.className="geBtn";f&&(l.style.display="none");b.editor.cancelFirst&&e.appendChild(l);k=mxUtils.button(k||mxResources.get("ok"),mxUtils.bind(this,function(){m||b.hideDialog(null,null,this.container);if(null!=
-d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}m&&b.hideDialog(null,null,this.container)}));e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=k;this.container=p},TemplatesDialog=function(b,e,d,c,k,g,n,f,l,m,p,q,t,u,v){function x(b){ua.innerHTML=mxUtils.htmlEntities(b);ua.style.display="block";setTimeout(function(){ua.style.display="none"},4E3)}function A(){null!=S&&(S.style.fontWeight=
-"normal",S.style.textDecoration="none",N=S,S=null)}function z(b,c,f,d,e,l,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";L.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");L.querySelector("."+c).src="/images/"+f+"-sel.svg";L.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function m(c,f){if(null==g){var d=c,d=/^https?:\/\//.test(d)&&
+d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}m&&b.hideDialog(null,null,this.container)}));e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=k;this.container=p},TemplatesDialog=function(b,e,d,c,k,g,n,f,l,m,p,q,t,u,v){function x(b){ga.innerHTML=mxUtils.htmlEntities(b);ga.style.display="block";setTimeout(function(){ga.style.display="none"},4E3)}function A(){null!=N&&(N.style.fontWeight=
+"normal",N.style.textDecoration="none",O=N,N=null)}function z(b,c,f,d,e,l,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+c).src="/images/"+f+"-sel.svg";J.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function m(c,f){if(null==g){var d=c,d=/^https?:\/\//.test(d)&&
!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(g=b.getText());f(g)}))}else f(g)}function k(d,e,l){if(null!=d&&mxUtils.isAncestorNode(document.body,f)&&(d=mxUtils.parseXml(d),d=Editor.extractGraphModel(d.documentElement,!0),null!=d)){"mxfile"==d.nodeName&&(d=Editor.parseDiagramNode(d.getElementsByTagName("diagram")[0]));var m=new mxCodec(d.ownerDocument),k=new mxGraphModel;
-m.decode(d,k);d=k.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var g=document.createElement("div");g.className="geTempDlgDialogMask";L.appendChild(g);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=
-function(){g&&(L.removeChild(g),g=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(g,"click",function(){b.sidebar.hideTooltip()})}}var g=null;if(ia||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){ia&&b.sidebar.currentElt==f&&k(c,mxEvent.getClientX(e),mxEvent.getClientY(e));ia=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;ia=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
-ia=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function B(b,c,f){if(null!=Y){for(var d=Y.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}Y.className=d.join(" ")}null!=b?(Y=b,Y.className+=" "+c,Z=f,ha.className="geTempDlgCreateBtn"):(Z=Y=null,ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=Z){var d=function(c){t.isExternal?l(t,function(b){k(b,c)},g):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.url,mxUtils.bind(this,function(b){200<=
-b.getStatus()&&299>=b.getStatus()?k(b.getText(),c):g()})):k(b.emptyDiagramXml,c)},k=function(c,d){v||b.hideDialog(!0);e(c,d,t,f)},g=function(){x(mxResources.get("cannotLoad"));p()},p=function(){Z=t;ha.className="geTempDlgCreateBtn";f&&(Q.className="geTempDlgOpenBtn")},t=Z;Z=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)m(t.url,t);else if(f)Q.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
-var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function D(b){ha.innerHTML=mxUtils.htmlEntities(mxResources.get(O||b?"create":"copy"));b=b?"none":"";q&&(Q.style.display=b);for(var c=L.querySelectorAll(".geTempDlgLinkToDiagram"),
-f=0;f<c.length;f++)c[f].style.display=b}function G(c,f,d,e,l){l||(X.innerHTML="",B(),la=c,ba=e);var m=null;if(d){m=document.createElement("table");m.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),g=document.createElement("th");g.style.width="50%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));k.appendChild(g);g=document.createElement("th");g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));k.appendChild(g);g=document.createElement("th");
-g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));k.appendChild(g);m.appendChild(k);X.appendChild(m)}for(k=0;k<c.length;k++){c[k].isExternal=!f;var p=c[k].url,q=(g=mxUtils.htmlEntities(f?mxResources.get(c[k].title,null,c[k].title):c[k].title))||c[k].url,t=c[k].imgUrl,n=mxUtils.htmlEntities(c[k].changedBy||""),L="";c[k].lastModifiedOn&&(L=b.timeSince(new Date(c[k].lastModifiedOn)),null==L&&(L=mxResources.get("lessThanAMinute")),L=mxUtils.htmlEntities(mxResources.get("timeAgo",
-[L],"{1} ago")));t||(t=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=g&&g.length>p&&(g=g.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=g;t.appendChild(q);u.appendChild(t);
-t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=L;u.appendChild(t);m.appendChild(u);null==Y&&(D(f),B(u,"geTempDlgDiagramsListGridActive",c[k]));(function(b,c,d){mxEvent.addListener(u,"click",function(){Y!=c&&(D(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[k],u,v)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",
-q);null==Y&&(D(f),B(A,"geTempDlgDiagramTileActive",c[k]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var K=document.createElement("img");K.style.display="none";(function(b,c,f){K.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};K.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(K,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
-"");K.src=t;n.appendChild(K);A.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=g?g:"";A.appendChild(n);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||A.appendChild(v);(function(b,c,d){mxEvent.addListener(A,"click",function(){Y!=c&&(D(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",C);mxEvent.addListener(v,
-"click",function(f){y(b,c,d,f)})})(c[k],A,v);X.appendChild(A)}}for(var x in e)c=e[x],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(x,null,x),X.appendChild(l),G(c,f,d,null,!0))}function E(b,c){ca.innerHTML="";B();for(var f=Math.floor(ca.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var m=document.createElement("div"),k=mxResources.get(l.title);null==k&&(k=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
-m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",k);k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"&hellip;");null==Y&&(D(!0),B(m,"geTempDlgNewDiagramCatItemActive",l));var g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;g.appendChild(p);m.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";g.innerHTML=k;m.appendChild(g);ca.appendChild(m);
-(function(b,c){mxEvent.addListener(m,"click",function(){Y!=c&&(D(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(m,"dblclick",C)})(l,m)}m=document.createElement("div");m.className="geTempDlgNewDiagramCatItem";k=mxResources.get("showAllTemps");m.setAttribute("title",k);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";g.innerHTML="...";g.style.fontSize="32px";m.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";
-g.innerHTML=k;m.appendChild(g);ca.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}O=!0;var c=L.querySelector(".geTemplatesList");c.style.display="block";ga.style.width="";da.style.display="";da.value="";fa=null;b()});U.style.display=b.length<=f?"none":""}function F(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+
-")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,m){mxEvent.addListener(e,"click",function(){S!=e&&(null!=S?(S.style.fontWeight="normal",S.style.textDecoration="none"):(W.style.display="none",pa.style.minHeight="100%"),S=e,S.style.fontWeight="bold",S.style.textDecoration="underline",ga.scrollTop=0,R&&(K=!0),V.innerHTML=d,ja.style.display="none",G(m?c[f]:l?ra[f][l]:b[f],m?!1:!0))})}var l=L.querySelector(".geTemplatesList");
+m.decode(d,k);d=k.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var g=document.createElement("div");g.className="geTempDlgDialogMask";J.appendChild(g);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=
+function(){g&&(J.removeChild(g),g=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(g,"click",function(){b.sidebar.hideTooltip()})}}var g=null;if(pa||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){pa&&b.sidebar.currentElt==f&&k(c,mxEvent.getClientX(e),mxEvent.getClientY(e));pa=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;pa=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
+pa=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function B(b,c,f){if(null!=X){for(var d=X.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}X.className=d.join(" ")}null!=b?(X=b,X.className+=" "+c,Z=f,da.className="geTempDlgCreateBtn"):(Z=X=null,da.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=Z){var d=function(c){t.isExternal?l(t,function(b){k(b,c)},g):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.url,mxUtils.bind(this,function(b){200<=
+b.getStatus()&&299>=b.getStatus()?k(b.getText(),c):g()})):k(b.emptyDiagramXml,c)},k=function(c,d){v||b.hideDialog(!0);e(c,d,t,f)},g=function(){x(mxResources.get("cannotLoad"));p()},p=function(){Z=t;da.className="geTempDlgCreateBtn";f&&(ia.className="geTempDlgOpenBtn")},t=Z;Z=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)m(t.url,t);else if(f)ia.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{da.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
+var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function E(b){da.innerHTML=mxUtils.htmlEntities(mxResources.get(R||b?"create":"copy"));b=b?"none":"";q&&(ia.style.display=b);for(var c=J.querySelectorAll(".geTempDlgLinkToDiagram"),
+f=0;f<c.length;f++)c[f].style.display=b}function D(c,f,d,e,l){l||(fa.innerHTML="",B(),la=c,qa=e);var m=null;if(d){m=document.createElement("table");m.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),g=document.createElement("th");g.style.width="50%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));k.appendChild(g);g=document.createElement("th");g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));k.appendChild(g);g=document.createElement("th");
+g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));k.appendChild(g);m.appendChild(k);fa.appendChild(m)}for(k=0;k<c.length;k++){c[k].isExternal=!f;var p=c[k].url,q=(g=mxUtils.htmlEntities(f?mxResources.get(c[k].title,null,c[k].title):c[k].title))||c[k].url,t=c[k].imgUrl,n=mxUtils.htmlEntities(c[k].changedBy||""),J="";c[k].lastModifiedOn&&(J=b.timeSince(new Date(c[k].lastModifiedOn)),null==J&&(J=mxResources.get("lessThanAMinute")),J=mxUtils.htmlEntities(mxResources.get("timeAgo",
+[J],"{1} ago")));t||(t=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=g&&g.length>p&&(g=g.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=g;t.appendChild(q);u.appendChild(t);
+t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=J;u.appendChild(t);m.appendChild(u);null==X&&(E(f),B(u,"geTempDlgDiagramsListGridActive",c[k]));(function(b,c,d){mxEvent.addListener(u,"click",function(){X!=c&&(E(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[k],u,v)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",
+q);null==X&&(E(f),B(A,"geTempDlgDiagramTileActive",c[k]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var x=document.createElement("img");x.style.display="none";(function(b,c,f){x.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};x.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(x,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
+"");x.src=t;n.appendChild(x);A.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=g?g:"";A.appendChild(n);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||A.appendChild(v);(function(b,c,d){mxEvent.addListener(A,"click",function(){X!=c&&(E(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",C);mxEvent.addListener(v,
+"click",function(f){y(b,c,d,f)})})(c[k],A,v);fa.appendChild(A)}}for(var K in e)c=e[K],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(K,null,K),fa.appendChild(l),D(c,f,d,null,!0))}function G(b,c){ba.innerHTML="";B();for(var f=Math.floor(ba.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var m=document.createElement("div"),k=mxResources.get(l.title);null==k&&(k=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
+m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",k);k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"&hellip;");null==X&&(E(!0),B(m,"geTempDlgNewDiagramCatItemActive",l));var g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;g.appendChild(p);m.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";g.innerHTML=k;m.appendChild(g);ba.appendChild(m);
+(function(b,c){mxEvent.addListener(m,"click",function(){X!=c&&(E(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(m,"dblclick",C)})(l,m)}m=document.createElement("div");m.className="geTempDlgNewDiagramCatItem";k=mxResources.get("showAllTemps");m.setAttribute("title",k);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";g.innerHTML="...";g.style.fontSize="32px";m.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";
+g.innerHTML=k;m.appendChild(g);ba.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}R=!0;var c=J.querySelector(".geTemplatesList");c.style.display="block";ea.style.width="";S.style.display="";S.value="";Y=null;b()});V.style.display=b.length<=f?"none":""}function F(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+")",
+e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,m){mxEvent.addListener(e,"click",function(){N!=e&&(null!=N?(N.style.fontWeight="normal",N.style.textDecoration="none"):(W.style.display="none",ra.style.minHeight="100%"),N=e,N.style.fontWeight="bold",N.style.textDecoration="underline",ea.scrollTop=0,U&&(K=!0),Q.innerHTML=d,ja.style.display="none",D(m?c[f]:l?ta[f][l]:b[f],m?!1:!0))})}var l=J.querySelector(".geTemplatesList");
if(0<f){f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(f,mxResources.get("custom"));l.appendChild(f);for(var m in c){f=document.createElement("div");var g=c[m],g=d(m,g);f.className="geTemplateCatLink";f.setAttribute("title",g.fullLbl);f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,f,null,!0)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
-mxUtils.write(f,"draw.io");l.appendChild(f)}for(m in b){var k=ra[m],p=f=document.createElement(k?"ul":"div"),g=b[m],g=d(m,g);if(null!=k){var q=document.createElement("li"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var n=document.createElement("ul");n.className="geTempTreeNested";n.style.visibility="hidden";for(var y in k){var u=document.createElement("li"),
+mxUtils.write(f,"draw.io");l.appendChild(f)}for(m in b){var k=ta[m],p=f=document.createElement(k?"ul":"div"),g=b[m],g=d(m,g);if(null!=k){var q=document.createElement("li"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var n=document.createElement("ul");n.className="geTempTreeNested";n.style.visibility="hidden";for(var y in k){var u=document.createElement("li"),
v=d(y,k[y]);u.setAttribute("title",v.fullLbl);u.innerHTML=v.lbl;u.className="geTemplateCatLink";u.style.padding="0";u.style.margin="0";e(m,v.lblOnly,u,y);n.appendChild(u)}q.appendChild(n);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=
-0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(n,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function I(){mxUtils.get(c,function(b){if(!na){na=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
-e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=qa[d];null==l&&(Aa++,l=[],qa[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||
-b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ra[d],null==l&&(l={},ra[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}F(qa,wa,Ba)}})}function H(b){n&&(ga.scrollTop=0,X.innerHTML="",ka.spin(X),K=!1,R=!0,V.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),fa=null,n(sa,function(){x(mxResources.get("cannotLoad"));sa([])},b?null:g))}function J(b){if(""==b)null!=N&&(N.click(),N=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
-{},d;for(d in qa)for(var e=qa[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var g=m.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(m)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<Ba&&null==f.__tagsList__){for(d in wa)for(e=wa[d],l=0;l<e.length;l++)for(m=e[l],g=m.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(m)}f.__tagsList__=!0}d=[];e={};
-for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?V.innerHTML=mxResources.get("noResultsFor",[b]):G(d,!0)}}function M(b){if(fa!=b||ea!=ma)A(),ga.scrollTop=0,X.innerHTML="",V.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',ya=null,O?J(b):f&&(b?(ka.spin(X),K=!1,R=!0,f(b,sa,function(){x(mxResources.get("searchFailed"));sa([])},
-ea?null:g)):H(ea)),fa=b,ma=ea}function P(b){null!=ya&&clearTimeout(ya);13==b.keyCode?M(da.value):ya=setTimeout(function(){M(da.value)},1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(n,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function I(){mxUtils.get(c,function(b){if(!ha){ha=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
+e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=na[d];null==l&&(Aa++,l=[],na[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||
+b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ta[d],null==l&&(l={},ta[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}F(na,va,Ba)}})}function L(b){n&&(ea.scrollTop=0,fa.innerHTML="",ma.spin(fa),K=!1,U=!0,Q.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),Y=null,n(ua,function(){x(mxResources.get("cannotLoad"));ua([])},b?null:g))}function H(b){if(""==b)null!=O&&(O.click(),O=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
+{},d;for(d in na)for(var e=na[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var g=m.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(m)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<Ba&&null==f.__tagsList__){for(d in va)for(e=va[d],l=0;l<e.length;l++)for(m=e[l],g=m.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(m)}f.__tagsList__=!0}d=[];e={};
+for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?Q.innerHTML=mxResources.get("noResultsFor",[b]):D(d,!0)}}function M(b){if(Y!=b||aa!=oa)A(),ea.scrollTop=0,fa.innerHTML="",Q.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',ya=null,R?H(b):f&&(b?(ma.spin(fa),K=!1,U=!0,f(b,ua,function(){x(mxResources.get("searchFailed"));ua([])},
+aa?null:g)):L(aa)),Y=b,oa=aa}function T(b){null!=ya&&clearTimeout(ya);13==b.keyCode?M(S.value):ya=setTimeout(function(){M(S.value)},1E3)}var P='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(t?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(q?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",L=document.createElement("div");L.innerHTML=T;L.className=
-"geTemplateDlg";this.container=L;c=null!=c?c:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var R=!1,K=!1,S=null,N=null,Y=null,Z=null,oa=!1,ea=!0,aa=!1,la=[],ba=null,fa,ma,O=!1,U=L.querySelector(".geTempDlgShowAllBtn"),X=L.querySelector(".geTempDlgDiagramsTiles"),V=L.querySelector(".geTempDlgDiagramsListTitle"),ja=L.querySelector(".geTempDlgDiagramsListBtns"),ga=L.querySelector(".geTempDlgContent"),pa=L.querySelector(".geTempDlgDiagramsList"),W=L.querySelector(".geTempDlgNewDiagramCat"),
-ca=L.querySelector(".geTempDlgNewDiagramCatList"),ha=L.querySelector(".geTempDlgCreateBtn"),Q=L.querySelector(".geTempDlgOpenBtn"),da=L.querySelector(".geTempDlgSearchBox"),ua=L.querySelector(".geTempDlgErrMsg"),ka=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(L.querySelector(".geTempDlgBack"),"click",function(){A();O=!1;L.querySelector(".geTemplatesList").style.display="none";ga.style.width=
-"100%";W.style.display="";pa.style.minHeight="calc(100% - 280px)";da.style.display=f?"":"none";da.value="";fa=null;H(ea)});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(ea=!0,null==fa?H(ea):M(fa))});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(ea=!1,null==fa?H(ea):M(fa))});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(aa=!0,G(la,!1,aa,ba))});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(aa=!1,G(la,
-!1,aa,ba))});var ia=!1;mxEvent.addListener(U,"click",function(){oa?(W.style.height="280px",ca.style.height="190px",U.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),E(va)):(W.style.height="440px",ca.style.height="355px",U.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),E(va,!0));oa=!oa});var na=!1,ta=!1,qa={},ra={},wa={},va=[],Aa=1,Ba=0;null!=p?p(function(b,c){wa=b;Ba=c;I()},I):I();mxUtils.get(k,function(b){if(!ta){ta=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==
-typeof b.getAttribute&&null!=b.getAttribute("title")&&va.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;E(va)}});var sa=function(b,c,f){ja.style.display="";ka.stop();R=!1;if(K)K=!1;else if(c)X.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?X.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):G(b,!1,aa,0==c?null:f)}};H(ea);var ya=null;mxEvent.addListener(da,"keyup",P);
-mxEvent.addListener(da,"search",P);mxEvent.addListener(da,"input",P);mxEvent.addListener(ha,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(Q,"click",function(b){C(!1,!0)});t&&mxEvent.addListener(L.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){C(!0)});mxEvent.addListener(L.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();v||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(t?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(q?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",J=document.createElement("div");J.innerHTML=P;J.className=
+"geTemplateDlg";this.container=J;c=null!=c?c:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,K=!1,N=null,O=null,X=null,Z=null,ka=!1,aa=!0,ca=!1,la=[],qa=null,Y,oa,R=!1,V=J.querySelector(".geTempDlgShowAllBtn"),fa=J.querySelector(".geTempDlgDiagramsTiles"),Q=J.querySelector(".geTempDlgDiagramsListTitle"),ja=J.querySelector(".geTempDlgDiagramsListBtns"),ea=J.querySelector(".geTempDlgContent"),ra=J.querySelector(".geTempDlgDiagramsList"),W=J.querySelector(".geTempDlgNewDiagramCat"),
+ba=J.querySelector(".geTempDlgNewDiagramCatList"),da=J.querySelector(".geTempDlgCreateBtn"),ia=J.querySelector(".geTempDlgOpenBtn"),S=J.querySelector(".geTempDlgSearchBox"),ga=J.querySelector(".geTempDlgErrMsg"),ma=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(J.querySelector(".geTempDlgBack"),"click",function(){A();R=!1;J.querySelector(".geTemplatesList").style.display="none";ea.style.width=
+"100%";W.style.display="";ra.style.minHeight="calc(100% - 280px)";S.style.display=f?"":"none";S.value="";Y=null;L(aa)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(aa=!0,null==Y?L(aa):M(Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
+"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(aa=!1,null==Y?L(aa):M(Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(ca=!0,D(la,!1,ca,qa))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(ca=!1,D(la,!1,ca,qa))});var pa=
+!1;mxEvent.addListener(V,"click",function(){ka?(W.style.height="280px",ba.style.height="190px",V.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),G(wa)):(W.style.height="440px",ba.style.height="355px",V.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),G(wa,!0));ka=!ka});var ha=!1,sa=!1,na={},ta={},va={},wa=[],Aa=1,Ba=0;null!=p?p(function(b,c){va=b;Ba=c;I()},I):I();mxUtils.get(k,function(b){if(!sa){sa=!0;for(b=b.getXml().documentElement.firstChild;null!=b;)"undefined"!==typeof b.getAttribute&&
+null!=b.getAttribute("title")&&wa.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;G(wa)}});var ua=function(b,c,f){ja.style.display="";ma.stop();U=!1;if(K)K=!1;else if(c)fa.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?fa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):D(b,!1,ca,0==c?null:f)}};L(aa);var ya=null;mxEvent.addListener(S,"keyup",T);mxEvent.addListener(S,
+"search",T);mxEvent.addListener(S,"input",T);mxEvent.addListener(da,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(ia,"click",function(b){C(!1,!0)});t&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){C(!0)});mxEvent.addListener(J.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();v||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,e,d,c){var k=document.createElement("div");k.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("done"));var n="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(n=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(n=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.notion?(n=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo.svg"):e==b.trello&&(n=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");
mxUtils.write(b,mxResources.get("authorizedIn",[n],"You are now authorized in {1}"));d=mxUtils.button(d,c);d.insertBefore(f,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";k.appendChild(g);k.appendChild(b);k.appendChild(d);this.container=k},FontDialog=function(b,e,d,c,k){function g(b){this.style.border="";13==b.keyCode&&y.click()}var n,f,l,m=document.createElement("table"),p=document.createElement("tbody");m.style.marginTop="8px";n=document.createElement("tr");
@@ -10334,129 +10335,129 @@ b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUt
this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,c){var f=1;if(null!=this.shape.state){var d=this.shape.state.cell.id;if(null!=d)for(var e=0;e<d.length;e++)f=(f<<5)-f+d.charCodeAt(e)<<0}f={strokeWidth:this.canvas.state.strokeWidth,seed:f,preserveVertices:!0};d=this.rc.getDefaultOptions();b?f.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
delete f.stroke;e=null;(f.filled=c)?(f.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):f.fill="";f.bowing=mxUtils.getValue(this.shape.style,"bowing",d.bowing);f.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",d.hachureAngle);f.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",d.curveFitting);f.roughness=mxUtils.getValue(this.shape.style,"jiggle",d.roughness);f.simplification=
mxUtils.getValue(this.shape.style,"simplification",d.simplification);f.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",d.disableMultiStroke);f.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",d.disableMultiStrokeFill);var l=mxUtils.getValue(this.shape.style,"hachureGap",-1);f.hachureGap="auto"==l?-1:l;f.dashGap=mxUtils.getValue(this.shape.style,"dashGap",l);f.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",l);f.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",l);l=mxUtils.getValue(this.shape.style,"fillWeight",-1);f.fillWeight="auto"==l?-1:l;l=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==l&&(l=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",l=null!=f.fill&&(null!=e||null!=l&&f.fill.toLowerCase()==l.toLowerCase())?"solid":d.fillStyle);f.fillStyle=l;return f};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
-this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,c),this.lastX=b,this.lastY=c)};b.prototype.moveTo=
-function(b,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,c),this.lastX=b,this.lastY=c,this.firstX=b,this.firstY=c)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,c,f,d){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,c,f,d),this.lastX=f,this.lastY=d)};b.prototype.curveTo=function(b,c,f,d,e,l){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,m);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],g[k+4],g[k+5]);this.lastX=l;this.lastY=m}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,c,f,d,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,c,f,d){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+f/2,c+d/2,f,d,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,c,f,d,e,l){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,c),this.lineTo(b+f-e,c),this.quadTo(b+f,c,b+f,c+l),this.lineTo(b+
-f,c+d-l),this.quadTo(b+f,c+d,b+f-e,c+d),this.lineTo(b+e,c+d),this.quadTo(b,c+d,b,c+d-l),this.lineTo(b,c+l),this.quadTo(b,c,b+e,c))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(Z){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in b)this.nextShape.options[c]=b[c];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
-this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.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(c){return new b(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var f=mxShape.prototype.paint;
-mxShape.prototype.paint=function(c){var d=c.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==b&&!this.outline){c.save();var l=this.fill,m=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,k=c.setStrokeColor;c.setStrokeColor=function(){};var p=c.setFillColor;c.setFillColor=function(){};e||null==l||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
-f.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=p;c.setStrokeColor=k;this.configurePointerEvents=g;this.stroke=m;this.fill=l;c.restore();e&&null!=l&&(c.addTolerance=function(){})}f.apply(this,arguments);c.addTolerance=d};var d=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,f,e,l,m,g){null!=c.handJiggle&&c.handJiggle.constructor==b?(c.handJiggle.passThrough=!0,d.apply(this,arguments),c.handJiggle.passThrough=!1):d.apply(this,arguments)}})();Editor.fastCompress=
-function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,c,f){if(null!=b&&"undefined"!==typeof pako){var d=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=d&&0<d.length)for(var l=0;l<d.length;l++)if("mxgraph"==d[l].getAttribute("class")){e.push(d[l]);
-break}0<e.length&&(d=e[0].getAttribute("data-mxgraph"),null!=d?(e=JSON.parse(d),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(d=mxUtils.getTextContent(e[0]),d=Graph.decompress(d,null,f),0<d.length&&(b=mxUtils.parseXml(d),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(d=b.getAttribute("content"),null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&
-(d=decodeURIComponent(d)),null!=d&&0<d.length)b=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||c||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),0<d.length&&(e=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,f)));null==b||"mxGraphModel"==b.nodeName||c&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,c){var f=mxUtils.trim(mxUtils.getTextContent(b)),
-d=null;0<f.length?(f=Graph.decompress(f,null,c),null!=f&&0<f.length&&(d=mxUtils.parseXml(f).documentElement)):(f=mxUtils.getChildNodes(b),0<f.length&&(d=mxUtils.createXmlDocument(),d.appendChild(d.importNode(f[0],!0)),d=d.documentElement));return d};Editor.getDiagramNodeXml=function(b){var c=mxUtils.getTextContent(b),f=null;0<c.length?f=Graph.decompress(c):null!=b.firstChild&&(f=mxUtils.getXml(b.firstChild));return f};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],m=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==
-d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?m=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(m=[],l[c.split(" ")[0]]=m):null!=m&&m.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
-c.length&&(c=b[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(b=b[c[1]],null!=b&&(b=b.join("\n"),f=b.substring(1,b.length-1))))));return f};Editor.extractGraphModelFromPng=function(b){var c=null;try{var f=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,f,e){b=d.substring(b+8,b+8+e);"zTXt"==f?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(c=b))):"tEXt"==f&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(c=b[1]));if(null!=c||"IDAT"==f)return!0}))}catch(N){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(b,c){var f=null,d=null!=b?b.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(f=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),
-0<d.length&&(f=mxUtils.getTextContent(d[0])));return null!=f?mxUtils.trim(f):f};Editor.addRetryToError=function(b,c){if(null!=b){var f=null!=b.error?b.error:b;null==f.retry&&(f.retry=c)}};Editor.configure=function(b,c){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
-ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
-b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=b.css){var f=document.createElement("style");f.setAttribute("type","text/css");f.appendChild(document.createTextNode(b.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(f,d)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
-b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(f=parseFloat(b.zoomFactor),!isNaN(f)&&1<f?Graph.prototype.zoomFactor=f:EditorUi.debug("Invalid zoomFactor: value must be float > 1"));null!=b.gridSteps&&
-(f=parseInt(b.gridSteps),!isNaN(f)&&0<f?mxGraphView.prototype.gridSteps=f:EditorUi.debug("Invalid gridSteps: value must be int > 0"));null!=b.pageFormat&&(f=parseInt(b.pageFormat.width),d=parseInt(b.pageFormat.height),!isNaN(f)&&0<f&&!isNaN(d)&&0<d?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,f,d),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Invalid pageFormat: value must be {width: int, height: int}"));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);
-b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&("string"===typeof b.fontCss?Editor.configureFontCss(b.fontCss):EditorUi.debug("Invalid fontCss: value must be string"));null!=b.autosaveDelay&&(f=parseInt(b.autosaveDelay),!isNaN(f)&&0<f?DrawioFile.prototype.autosaveDelay=f:EditorUi.debug("Invalid autosaveDelay: value must be int > 0"));
-if(null!=b.plugins&&!c)for(App.initPluginCallback(),f=0;f<b.plugins.length;f++)mxscript(b.plugins[f]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=b){Editor.prototype.fontCss=b;var c=document.getElementsByTagName("script")[0];if(null!=c&&null!=c.parentNode){var f=document.createElement("style");f.setAttribute("type","text/css");f.appendChild(document.createTextNode(b));
-c.parentNode.insertBefore(f,c);b=b.split("url(");for(f=1;f<b.length;f++){var d=b[f].indexOf(")"),d=Editor.trimCssUrl(b[f].substring(0,d)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",d);e.setAttribute("as","font");e.setAttribute("crossorigin","");c.parentNode.insertBefore(e,c)}}}};Editor.trimCssUrl=function(b){return b.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(b){b=null!=b?b:Editor.GUID_LENGTH;for(var c=[],f=0;f<b;f++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;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(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var f=c.getElementsByTagName("parsererror");if(null!=f&&0<f.length){var f=f[0],d=f.getElementsByTagName("div");null!=d&&0<d.length&&(f=d[0]);throw{message:mxUtils.getTextContent(f)};}if("mxGraphModel"==c.nodeName){f=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=f&&""!=f)f!=this.graph.currentStyle&&(d=null!=
-this.graph.themes?this.graph.themes[f]:mxUtils.load(STYLE_PATH+"/"+f+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=f;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");f=c.getAttribute("backgroundImage");
-null!=f?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(f)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1);if(f=c.getAttribute("extFonts"))try{for(f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],
-url:b[1]}}),d=0;d<f.length;d++)this.graph.addExtFont(f[d].name,f[d].url)}catch(N){console.log("ExtFonts format error: "+N.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(b,c){b=null!=b?b:!0;var f=e.apply(this,arguments);null!=this.graph.currentStyle&&
-"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var d=this.graph.getBackgroundImageObject(this.graph.backgroundImage,c);null!=d&&f.setAttribute("backgroundImage",JSON.stringify(d));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(d=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",d.join("|")));return f};
-Editor.prototype.isDataSvg=function(b){try{var c=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var f=mxUtils.parseXml(c).documentElement;return"mxfile"==f.nodeName||"mxGraphModel"==f.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=function(b,c,f){return Editor.extractGraphModel.apply(this,
-arguments)};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();d.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,c){if("undefined"===typeof window.MathJax){b=(null!=
-b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var f=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";c=null!=c?c:{"HTML-CSS":{availableFonts:[f],imageFont:null},SVG:{font:f,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
-window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var d=Editor.prototype.init;Editor.prototype.init=
-function(){d.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",b);f[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var l=document.createElement("style");
-l.type="text/css";l.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(l)}}catch(Z){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var c=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
-function(b,f,d,e){void 0!==f?c.push(f.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==e&&c.push(e);return""});/,\s*$/.test(b)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.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(b)||
-"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var c=b.convert,f=this;b.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=Editor.svgBrokenImage.src:!e||d.substring(0,b.baseUrl.length)==b.baseUrl||f.crossOriginImages&&f.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=c.apply(this,arguments)):
-d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,c){try{var f=!0,d=window.setTimeout(mxUtils.bind(this,function(){f=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(d);f&&c(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(d);
-f&&c(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(f)try{var b=document.createElement("canvas"),l=b.getContext("2d");b.height=e.height;b.width=e.width;l.drawImage(e,0,0);c(b.toDataURL())}catch(oa){c(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)};e.src=b}}catch(Y){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,c,f,
-d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,m){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(m));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(m,d));e--;0==e&&c(b)})):f.setAttribute(m,k)}else null!=g&&f.setAttribute(m,g)}}catch(ma){}})(g[k])});f("image","xlink:href");f("img",
-"src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,m;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
-4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}m=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(m&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return c};
-Editor.prototype.loadUrl=function(b,c,f,d,e,l,m,g){try{var k=!m&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var d=Array(b.length),e=0;e<b.length;e++)d[e]=String.fromCharCode(b[e]);d=d.join("")}l=null!=l?l:"data:image/png;base64,";d=l+Editor.base64Encode(d)}c(d)}}else null!=f&&(0==b.getStatus()?f({message:mxResources.get("accessDenied")},b):f({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=f&&f({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:p})},g)});p()}catch(la){null!=f&&f(la)}};Editor.prototype.absoluteCssFonts=
-function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var m=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(m)&&(m=null!=e?e+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":b)+m);
-c.push('url("'+m+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var m=f[l].indexOf(")"),
-g=null,k=f[l].indexOf("format(",m);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";
-else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,m)),g)}e()}else c(b)};Editor.prototype.loadFonts=
-function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;b()})):b()};Editor.prototype.embedExtFonts=function(b){var c=this.graph.getCustomFonts();if(0<c.length){var f="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(f,b)}),l=0;l<c.length;l++)mxUtils.bind(this,function(b,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(d++,this.loadUrl(c,
-mxUtils.bind(this,function(b){this.cachedGoogleFonts[c]=b;f+=b;d--;e()}),mxUtils.bind(this,function(b){d--;f+="@import url("+c+");";e()}))):f+=this.cachedGoogleFonts[c]:f+='@font-face {font-family: "'+b+'";src: url("'+c+'")}'})(c[l].name,c[l].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var c=document.getElementsByTagName("style"),f=0;f<c.length;f++)0<mxUtils.getTextContent(c[f]).indexOf("MathJax")&&b[0].appendChild(c[f].cloneNode(!0))};
-Editor.prototype.addFontCss=function(b,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var f=b.getElementsByTagName("defs"),d=b.ownerDocument;0==f.length?(f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):f=f[0];d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,c);f.appendChild(d)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,m,g,k,p,q,t,n,y,u,v,B,A){try{l=null!=l?l:!0;m=null!=m?m:!0;t=null!=t?t:this.graph;n=null!=n?n:0;var x=k?null:t.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(t.getSvg(null,null,n,y,null,m,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=
-Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var v=t.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,C=t.gridSize*v.gridSteps*g,L=t.getGraphBounds(),F=v.translate.x*B,z=v.translate.y*B,K=F+(L.x-F)/B-n,M=z+(L.y-z)/B-n,E=new Image;E.onload=function(){try{for(var b=
--Math.round(C-mxUtils.mod((F-K)*g,C)),c=-Math.round(C-mxUtils.mod((z-M)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)y.drawImage(E,b/g,f/g);m()}catch(xa){null!=e&&e(xa)}};E.onerror=function(b){null!=e&&e(b)};E.src=A}else m()}catch(sa){null!=e&&e(sa)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(ca){null!=
-e&&e(ca)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(m)}catch(ha){null!=e&&e(ha)}}))}catch(ca){null!=e&&e(ca)}}),f,q)}catch(ga){null!=e&&e(ga)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var g=k,n=0;8>n;n++)g=1==(g&1)?3988292384^g>>>1:g>>>1,Editor.crcTable[k]=g;Editor.updateCRC=function(b,c,f,d){for(var e=0;e<d;e++)b=Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>
-8^Editor.crcTable[(c^b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function m(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(l(b,4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=m(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,f,0,f.length);e+=g(f.length)+c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+
-(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,f=c.editor.graph,d=this.createOption(mxResources.get("shadow"),
-function(){return f.shadowVisible},function(b){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=b;f.model.execute(d)},{install:function(b){this.listener=function(){b(f.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.enableShadowOption||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));b.appendChild(d)}return b};var t=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=t.apply(this,arguments);var c=this.editorUi,f=c.editor.graph;if(f.isEnabled()){var d=c.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(b){c.editor.setAutosave(b);c.editor.autosave&&d.isModified()&&d.fileChanged()},{install:function(b){this.listener=function(){b(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});
-b.appendChild(e)}}if(this.isMathOptionVisible()&&f.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return f.mathEnabled},function(b){c.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(f.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var l=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";e.appendChild(l)}return b};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:"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);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",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
-type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},
-{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},
-{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",
-stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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(b,c,f){if(null!=c){var d=function(b){if(null!=b)if(f)for(var d=
-0;d<b.length;d++)c[b[d].name]=b[d];else for(var e in c){for(var l=!1,d=0;d<b.length;d++)if(b[d].name==e&&b[d].type==c[e].type){l=!0;break}l||delete c[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-d(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{d(JSON.parse(b))}catch(Y){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},f=b.vertices,d=b.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],c,0==
-e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var c=this.format.getSelectionState(),f=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));f.setAttribute("title",
-mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");f.style.marginBottom="2px";f.style.width="104px";f.style.marginRight="2px";b.appendChild(f);0<c.cells.length?(f=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),f.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),f.style.marginBottom="2px",f.style.width="104px",b.appendChild(f)):
-f.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,c,f){function d(b,c,f,d){t.getModel().beginUpdate();try{var e=[],l=[];if(null!=f.index){for(var m=[],g=f.parentRow.nextSibling;g&&g.getAttribute("data-pName")==b;)m.push(g.getAttribute("data-pValue")),g=g.nextSibling;f.index<m.length?null!=d?m.splice(d,1):m[f.index]=c:m.push(c);null!=f.size&&m.length>f.size&&(m=m.slice(0,f.size));c=m.join(",");
-null!=f.countProperty&&(t.setCellStyles(f.countProperty,m.length,t.getSelectionCells()),e.push(f.countProperty),l.push(m.length))}t.setCellStyles(b,c,t.getSelectionCells());e.push(b);l.push(c);if(null!=f.dependentProps)for(b=0;b<f.dependentProps.length;b++){var k=f.dependentPropsDefVal[b],p=f.dependentPropsVals[b];if(p.length>c)p=p.slice(0,c);else for(var n=p.length;n<c;n++)p.push(k);p=p.join(",");t.setCellStyles(f.dependentProps[b],p,t.getSelectionCells());e.push(f.dependentProps[b]);l.push(p)}if("function"==
-typeof f.onChange)f.onChange(t,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",l,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function e(c,f,d){var e=mxUtils.getOffset(b,!0),l=mxUtils.getOffset(c,!0);f.style.position="absolute";f.style.left=l.x-e.x+"px";f.style.top=l.y-e.y+"px";f.style.width=c.offsetWidth+"px";f.style.height=c.offsetHeight-(d?4:0)+"px";f.style.zIndex=5}function l(b,c,f){var e=document.createElement("div");e.style.width="32px";e.style.height=
-"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(b,c,f,e,l,m,g){null!=c&&(c=c.split(","),n.push({name:b,
-values:c,type:f,defVal:e,countProperty:l,parentRow:m,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=m,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var t={type:f,parentRow:m,index:q,isDeletable:!0,defVal:e,countProperty:l},q=p(b,"",t,0==q%2,g);d(b,e,t);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function g(b,c,f,d,e,l,m){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";n.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:m,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,t,n){var y=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+
-(n?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);t=!1;null!=p.index&&(v.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",t=!0);var B=document.createElement("td");B.className="gePropRowCell";y=mxResources.get(y,null,y);mxUtils.write(B,y);B.setAttribute("title",y);t&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==
-u||"boolean"==u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(n=0;n<A.length;n++)if(y=A[n],y.val==f){mxUtils.write(B,mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var m=0;m<A.length;m++){var g=A[m],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);mxUtils.write(k,mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=f;b.appendChild(l);
-mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(m(c,f,p.subType,p.subDefVal,p.countProperty,v,n)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,v,n)):"readOnly"==u?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=f,n.style.width="96px",n.style.borderWidth="0px",B.appendChild(n)):(B.innerHTML=f,mxEvent.addListener(B,
-"click",mxUtils.bind(q,function(){function l(){var b=m.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):b)+"");d(c,b,p)}var m=document.createElement("input");e(B,m,!0);m.value=f;m.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=p.min&&
-(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));b.appendChild(m);mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&l()});m.focus();mxEvent.addListener(m,"blur",function(){l()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",B.appendChild(n));v.appendChild(B);return v}var q=this,t=this.editorUi.editor.graph,n=[];b.style.position=
-"relative";b.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;B.style.verticalAlign="middle";v.appendChild(B);mxUtils.write(v,mxResources.get("property"));u.style.cursor="pointer";var A=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),
-f;if(q.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;f="none";for(var d=b.childNodes.length-1;0<=d;d--)try{var e=b.childNodes[d],l=e.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||b.removeChild(e)}catch(qa){}}else B.src=Sidebar.prototype.expandedImage,f="";for(d=0;d<c.length;d++)c[d].style.display=f};mxEvent.addListener(u,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;A()});u.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";
-v.innerHTML=mxResources.get("value");u.appendChild(v);y.appendChild(u);var x=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var F in c)if(u=c[F],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[F]?mxUtils.htmlEntities(f.style[F]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==
-u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var L=u.dependentProps,M=[],E=[],v=0;v<L.length;v++){var D=f.style[L[v]];E.push(c[L[v]].subDefVal);M.push(null!=D?D.split(","):[])}u.dependentPropsDefVal=E;u.dependentPropsVals=M}y.appendChild(p(F,z,u,x,C));x=!x}}for(v=0;v<n.length;v++)for(u=n[v],c=u.parentRow,f=0;f<u.values.length;f++)F=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
-index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(F,c.nextSibling),c=F;b.appendChild(y);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="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(" "),m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";m.style.width="210px";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");
-p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);g.push(p);m.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");
-this.format.currentScheme=b;t(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),t=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,m=0;m<e.length;m++){for(var g=d.getModel().getStyle(e[m]),k=0;k<l.length;k++)g=mxUtils.removeStylename(g,l[k]);var p=d.getModel().isVertex(e[m])?f.initialDefaultVertexStyle:
-f.initialdefaultEdgeStyle;null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(g=""==b.fill?mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(g=""==b.stroke?mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,
-b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!d.getModel().isVertex(e[m])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,
-mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(e[m])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(e[m],g)}}finally{d.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=b){var m="1"==urlParams.sketch?"2px solid":"1px solid";
-null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==b.fill?mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):
-b.fill||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=b.stroke==mxConstants.NONE?m+" transparent":""==b.stroke?m+" "+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):m+" "+(b.stroke||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&c.setAttribute("title",b.title)}else{var m=
-mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=m;c.style.border="1px solid "+g}c.style.borderRadius="0";e.appendChild(c)});e.innerHTML="";for(var m=0;m<b.length;m++)0<m&&0==mxUtils.mod(m,4)&&mxUtils.br(e),c(b[m])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
-28:8,n=document.createElement("div");n.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"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(n,
-"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var y=document.createElement("div");y.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"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==);";
+"zigzagOffset",l);l=mxUtils.getValue(this.shape.style,"fillWeight",-1);f.fillWeight="auto"==l?-1:l;l=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==l&&(l=null!=this.shape.state&&"transparent"!=this.shape.state.view.graph.defaultPageBackgroundColor?this.shape.state.view.graph.defaultPageBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff",l=null!=f.fill&&(null!=e||null!=l&&f.fill.toLowerCase()==l.toLowerCase())?"solid":d.fillStyle);f.fillStyle=l;return f};b.prototype.begin=
+function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,c){this.passThrough?
+this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,c),this.lastX=b,this.lastY=c)};b.prototype.moveTo=function(b,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,c),this.lastX=b,this.lastY=c,this.firstX=b,this.firstY=c)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,c,f,d){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,b,c,f,d),this.lastX=f,this.lastY=d)};b.prototype.curveTo=function(b,c,f,d,e,l){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,m);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],
+g[k+4],g[k+5]);this.lastX=l;this.lastY=m}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,c,f,d,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,c,f,d){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+f/2,c+d/2,f,d,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,c,f,d,e,l){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(b+e,c),this.lineTo(b+f-e,c),this.quadTo(b+f,c,b+f,c+l),this.lineTo(b+f,c+d-l),this.quadTo(b+f,c+d,b+f-e,c+d),this.lineTo(b+e,c+d),this.quadTo(b,c+d,b,c+d-l),this.lineTo(b,c+l),this.quadTo(b,c,b+e,c))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(Z){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in b)this.nextShape.options[c]=b[c];null==b.stroke&&delete this.nextShape.options.stroke;
+b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};b.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(c){return new b(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):
+this.createRoughCanvas(b)};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(c){var d=c.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==b&&!this.outline){c.save();var l=this.fill,m=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,k=c.setStrokeColor;c.setStrokeColor=function(){};var p=c.setFillColor;c.setFillColor=function(){};e||null==l||(this.configurePointerEvents=
+function(){});c.handJiggle.passThrough=!0;f.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=p;c.setStrokeColor=k;this.configurePointerEvents=g;this.stroke=m;this.fill=l;c.restore();e&&null!=l&&(c.addTolerance=function(){})}f.apply(this,arguments);c.addTolerance=d};var d=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,f,e,l,m,g){null!=c.handJiggle&&c.handJiggle.constructor==b?(c.handJiggle.passThrough=!0,d.apply(this,arguments),c.handJiggle.passThrough=
+!1):d.apply(this,arguments)}})();Editor.fastCompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,c,f){if(null!=b&&"undefined"!==typeof pako){var d=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=d&&0<d.length)for(var l=0;l<d.length;l++)if("mxgraph"==
+d[l].getAttribute("class")){e.push(d[l]);break}0<e.length&&(d=e[0].getAttribute("data-mxgraph"),null!=d?(e=JSON.parse(d),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(d=mxUtils.getTextContent(e[0]),d=Graph.decompress(d,null,f),0<d.length&&(b=mxUtils.parseXml(d),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(d=b.getAttribute("content"),null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,
+d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)b=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||c||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),0<d.length&&(e=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,f)));null==b||"mxGraphModel"==b.nodeName||c&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,
+c){var f=mxUtils.trim(mxUtils.getTextContent(b)),d=null;0<f.length?(f=Graph.decompress(f,null,c),null!=f&&0<f.length&&(d=mxUtils.parseXml(f).documentElement)):(f=mxUtils.getChildNodes(b),0<f.length&&(d=mxUtils.createXmlDocument(),d.appendChild(d.importNode(f[0],!0)),d=d.documentElement));return d};Editor.getDiagramNodeXml=function(b){var c=mxUtils.getTextContent(b),f=null;0<c.length?f=Graph.decompress(c):null!=b.firstChild&&(f=mxUtils.getXml(b.firstChild));return f};Editor.extractGraphModelFromPdf=
+function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],m=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));
+g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?m=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(m=[],l[c.split(" ")[0]]=m):null!=m&&m.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),
+null!=c&&0<c.length&&(c=b[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(b=b[c[1]],null!=b&&(b=b.join("\n"),f=b.substring(1,b.length-1))))));return f};Editor.extractGraphModelFromPng=function(b){var c=null;try{var f=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,f,e){b=d.substring(b+8,b+8+e);"zTXt"==f?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,
+e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(c=b))):"tEXt"==f&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(c=b[1]));if(null!=c||"IDAT"==f)return!0}))}catch(O){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(b,c){var f=null,d=null!=b?b.getElementsByTagName("parsererror"):null;
+null!=d&&0<d.length&&(f=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),0<d.length&&(f=mxUtils.getTextContent(d[0])));return null!=f?mxUtils.trim(f):f};Editor.addRetryToError=function(b,c){if(null!=b){var f=null!=b.error?b.error:b;null==f.retry&&(f.retry=c)}};Editor.configure=function(b,c){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;
+ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=
+b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=b.css){var f=document.createElement("style");f.setAttribute("type","text/css");f.appendChild(document.createTextNode(b.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(f,d)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);
+null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(f=parseFloat(b.zoomFactor),
+!isNaN(f)&&1<f?Graph.prototype.zoomFactor=f:EditorUi.debug("Invalid zoomFactor: value must be float > 1"));null!=b.gridSteps&&(f=parseInt(b.gridSteps),!isNaN(f)&&0<f?mxGraphView.prototype.gridSteps=f:EditorUi.debug("Invalid gridSteps: value must be int > 0"));null!=b.pageFormat&&(f=parseInt(b.pageFormat.width),d=parseInt(b.pageFormat.height),!isNaN(f)&&0<f&&!isNaN(d)&&0<d?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,f,d),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
+EditorUi.debug("Invalid pageFormat: value must be {width: int, height: int}"));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&("string"===typeof b.fontCss?Editor.configureFontCss(b.fontCss):EditorUi.debug("Invalid fontCss: value must be string"));null!=b.autosaveDelay&&(f=parseInt(b.autosaveDelay),
+!isNaN(f)&&0<f?DrawioFile.prototype.autosaveDelay=f:EditorUi.debug("Invalid autosaveDelay: value must be int > 0"));if(null!=b.plugins&&!c)for(App.initPluginCallback(),f=0;f<b.plugins.length;f++)mxscript(b.plugins[f]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=b){Editor.prototype.fontCss=b;var c=document.getElementsByTagName("script")[0];if(null!=c&&
+null!=c.parentNode){var f=document.createElement("style");f.setAttribute("type","text/css");f.appendChild(document.createTextNode(b));c.parentNode.insertBefore(f,c);b=b.split("url(");for(f=1;f<b.length;f++){var d=b[f].indexOf(")"),d=Editor.trimCssUrl(b[f].substring(0,d)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",d);e.setAttribute("as","font");e.setAttribute("crossorigin","");c.parentNode.insertBefore(e,c)}}}};Editor.trimCssUrl=function(b){return b.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(b){b=null!=b?b:Editor.GUID_LENGTH;for(var c=[],f=0;f<b;f++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;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(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var f=c.getElementsByTagName("parsererror");if(null!=f&&0<f.length){var f=f[0],d=f.getElementsByTagName("div");null!=d&&0<d.length&&(f=d[0]);throw{message:mxUtils.getTextContent(f)};}if("mxGraphModel"==c.nodeName){f=c.getAttribute("style")||
+"default-style2";if("1"==urlParams.embed||null!=f&&""!=f)f!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[f]:mxUtils.load(STYLE_PATH+"/"+f+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=
+f;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");f=c.getAttribute("backgroundImage");null!=f?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(f)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),
+!1);if(f=c.getAttribute("extFonts"))try{for(f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),d=0;d<f.length;d++)this.graph.addExtFont(f[d].name,f[d].url)}catch(O){console.log("ExtFonts format error: "+O.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(b,c){b=null!=b?b:!0;var f=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var d=this.graph.getBackgroundImageObject(this.graph.backgroundImage,c);null!=d&&f.setAttribute("backgroundImage",JSON.stringify(d));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(d=this.graph.extFonts.map(function(b){return b.name+
+"^"+b.url}),f.setAttribute("extFonts",d.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var c=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var f=mxUtils.parseXml(c).documentElement;return"mxfile"==f.nodeName||"mxGraphModel"==f.nodeName}}catch(N){}return!1};Editor.prototype.extractGraphModel=
+function(b,c,f){return Editor.extractGraphModel.apply(this,arguments)};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();d.apply(this,arguments)};
+var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
+Editor.initMath=function(b,c){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var f=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";c=null!=c?c:{"HTML-CSS":{availableFonts:[f],imageFont:null},
+SVG:{font:f,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var d=Editor.prototype.init;Editor.prototype.init=function(){d.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",
+b);f[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var l=document.createElement("style");l.type="text/css";l.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(l)}}catch(Z){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+var c=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,f,d,e){void 0!==f?c.push(f.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==e&&c.push(e);return""});/,\s*$/.test(b)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.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(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var c=b.convert,f=this;b.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=Editor.svgBrokenImage.src:!e||d.substring(0,b.baseUrl.length)==
+b.baseUrl||f.crossOriginImages&&f.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=c.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,c){try{var f=!0,d=window.setTimeout(mxUtils.bind(this,function(){f=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,
+mxUtils.bind(this,function(b){window.clearTimeout(d);f&&c(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(f)try{var b=document.createElement("canvas"),l=b.getContext("2d");b.height=e.height;b.width=e.width;l.drawImage(e,0,0);c(b.toDataURL())}catch(ka){c(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);
+f&&c(Editor.svgBrokenImage.src)};e.src=b}}catch(X){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,c,f,d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,m){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(m));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(m,d));
+e--;0==e&&c(b)})):f.setAttribute(m,k)}else null!=g&&f.setAttribute(m,g)}}catch(oa){}})(g[k])});f("image","xlink:href");f("img","src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,m;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}m=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(m&192)>>6);
+c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return c};Editor.prototype.loadUrl=function(b,c,f,d,e,l,m,g){try{var k=!m&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==
+typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();for(var d=Array(b.length),e=0;e<b.length;e++)d[e]=String.fromCharCode(b[e]);d=d.join("")}l=null!=l?l:"data:image/png;base64,";d=l+Editor.base64Encode(d)}c(d)}}else null!=f&&(0==b.getStatus()?f({message:mxResources.get("accessDenied")},b):f({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=f&&f({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=
+f&&f({code:App.ERROR_TIMEOUT,retry:p})},g)});p()}catch(la){null!=f&&f(la)}};Editor.prototype.absoluteCssFonts=function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var m=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(m)&&
+(m=null!=e?e+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":b)+m);c.push('url("'+m+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);
+b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var m=f[l].indexOf(")"),g=null,k=f[l].indexOf("format(",m);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==
+g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,
+null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,m)),g)}e()}else c(b)};Editor.prototype.loadFonts=function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;null!=b&&b()})):null!=b&&b()};Editor.prototype.embedExtFonts=function(b){var c=this.graph.getCustomFonts();if(0<c.length){var f="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==
+d&&this.embedCssFonts(f,b)}),l=0;l<c.length;l++)mxUtils.bind(this,function(b,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(d++,this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedGoogleFonts[c]=b;f+=b;d--;e()}),mxUtils.bind(this,function(b){d--;f+="@import url("+c+");";e()}))):f+=this.cachedGoogleFonts[c]:f+='@font-face {font-family: "'+b+'";src: url("'+c+'")}'})(c[l].name,c[l].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&
+0<b.length)for(var c=document.getElementsByTagName("style"),f=0;f<c.length;f++)0<mxUtils.getTextContent(c[f]).indexOf("MathJax")&&b[0].appendChild(c[f].cloneNode(!0))};Editor.prototype.addFontCss=function(b,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var f=b.getElementsByTagName("defs"),d=b.ownerDocument;0==f.length?(f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):
+f=f[0];d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,c);f.appendChild(d)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,m,g,k,p,q,t,n,y,u,v,B,A){try{l=null!=l?l:!0;
+m=null!=m?m:!0;t=null!=t?t:this.graph;n=null!=n?n:0;var x=k?null:t.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(t.getSvg(null,null,n,y,null,m,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),
+p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var v=t.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+
+A,F=t.gridSize*v.gridSteps*g,C=t.getGraphBounds(),J=v.translate.x*B,z=v.translate.y*B,K=J+(C.x-J)/B-n,D=z+(C.y-z)/B-n,M=new Image;M.onload=function(){try{for(var b=-Math.round(F-mxUtils.mod((J-K)*g,F)),c=-Math.round(F-mxUtils.mod((z-D)*g,F));b<p;b+=F)for(var f=c;f<q;f+=F)y.drawImage(M,b/g,f/g);m()}catch(xa){null!=e&&e(xa)}};M.onerror=function(b){null!=e&&e(b)};M.src=A}else m()}catch(ua){null!=e&&e(ua)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);
+var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(ba){null!=e&&e(ba)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(m)}catch(da){null!=e&&e(da)}}))}catch(ba){null!=e&&e(ba)}}),f,q)}catch(ea){null!=e&&e(ea)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var g=k,n=0;8>n;n++)g=1==(g&1)?3988292384^g>>>1:g>>>1,Editor.crcTable[k]=g;Editor.updateCRC=
+function(b,c,f,d){for(var e=0;e<d;e++)b=Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>8^Editor.crcTable[(c^b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function m(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&
+255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(l(b,4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=m(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,
+f,0,f.length);e+=g(f.length)+c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;
+ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
+this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(b){b=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,f=c.editor.graph,d=this.createOption(mxResources.get("shadow"),function(){return f.shadowVisible},function(b){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=b;f.model.execute(d)},{install:function(b){this.listener=function(){b(f.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});
+Editor.enableShadowOption||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));b.appendChild(d)}return b};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=t.apply(this,arguments);var c=this.editorUi,f=c.editor.graph;if(f.isEnabled()){var d=c.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(b){c.editor.setAutosave(b);
+c.editor.autosave&&d.isModified()&&d.fileChanged()},{install:function(b){this.listener=function(){b(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&&f.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return f.mathEnabled},function(b){c.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=
+function(){b(f.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var l=c.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");l.style.position="relative";l.style.marginLeft="6px";l.style.top="2px";e.appendChild(l)}return b};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:"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);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",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",
+dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];
+mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},
+{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,
+defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=
+[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",
+font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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(b,c,f){if(null!=c){var d=function(b){if(null!=b)if(f)for(var d=0;d<b.length;d++)c[b[d].name]=b[d];else for(var e in c){for(var l=!1,d=0;d<b.length;d++)if(b[d].name==e&&b[d].type==c[e].type){l=!0;break}l||delete c[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||
+(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),d(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{d(JSON.parse(b))}catch(X){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=
+b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},f=b.vertices,d=b.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],c,0==e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,b))}};var v=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(b){var c=this.format.getSelectionState(),f=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));f.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");f.style.marginBottom="2px";f.style.width="104px";f.style.marginRight="2px";b.appendChild(f);0<c.cells.length?(f=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),
+f.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),f.style.marginBottom="2px",f.style.width="104px",b.appendChild(f)):f.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,c,f){function d(b,c,f,d){t.getModel().beginUpdate();try{var e=[],l=[];if(null!=f.index){for(var m=[],g=f.parentRow.nextSibling;g&&g.getAttribute("data-pName")==
+b;)m.push(g.getAttribute("data-pValue")),g=g.nextSibling;f.index<m.length?null!=d?m.splice(d,1):m[f.index]=c:m.push(c);null!=f.size&&m.length>f.size&&(m=m.slice(0,f.size));c=m.join(",");null!=f.countProperty&&(t.setCellStyles(f.countProperty,m.length,t.getSelectionCells()),e.push(f.countProperty),l.push(m.length))}t.setCellStyles(b,c,t.getSelectionCells());e.push(b);l.push(c);if(null!=f.dependentProps)for(b=0;b<f.dependentProps.length;b++){var k=f.dependentPropsDefVal[b],p=f.dependentPropsVals[b];
+if(p.length>c)p=p.slice(0,c);else for(var n=p.length;n<c;n++)p.push(k);p=p.join(",");t.setCellStyles(f.dependentProps[b],p,t.getSelectionCells());e.push(f.dependentProps[b]);l.push(p)}if("function"==typeof f.onChange)f.onChange(t,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",l,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function e(c,f,d){var e=mxUtils.getOffset(b,!0),l=mxUtils.getOffset(c,!0);f.style.position="absolute";f.style.left=l.x-e.x+"px";
+f.style.top=l.y-e.y+"px";f.style.width=c.offsetWidth+"px";f.style.height=c.offsetHeight-(d?4:0)+"px";f.style.zIndex=5}function l(b,c,f){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":
+c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(b,c,f,e,l,m,g){null!=c&&(c=c.split(","),n.push({name:b,values:c,type:f,defVal:e,countProperty:l,parentRow:m,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=m,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var t={type:f,parentRow:m,index:q,isDeletable:!0,defVal:e,
+countProperty:l},q=p(b,"",t,0==q%2,g);d(b,e,t);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function g(b,c,f,d,e,l,m){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";n.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:m,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";
+e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,t,n){var y=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+(n?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);t=!1;null!=p.index&&(v.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",t=!0);var B=document.createElement("td");B.className="gePropRowCell";y=mxResources.get(y,null,y);mxUtils.write(B,
+y);B.setAttribute("title",y);t&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==u||"boolean"==u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(n=0;n<A.length;n++)if(y=A[n],y.val==f){mxUtils.write(B,mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var m=0;m<A.length;m++){var g=
+A[m],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);mxUtils.write(k,mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=f;b.appendChild(l);mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(m(c,f,p.subType,p.subDefVal,p.countProperty,v,n)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,v,n)):"readOnly"==
+u?(n=document.createElement("input"),n.setAttribute("readonly",""),n.value=f,n.style.width="96px",n.style.borderWidth="0px",B.appendChild(n)):(B.innerHTML=f,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function l(){var b=m.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):b)+"");d(c,
+b,p)}var m=document.createElement("input");e(B,m,!0);m.value=f;m.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(m.type="number",m.step="int"==u?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));b.appendChild(m);mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&l()});m.focus();mxEvent.addListener(m,"blur",function(){l()})})));p.isDeletable&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),n.style.height=
+"16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",B.appendChild(n));v.appendChild(B);return v}var q=this,t=this.editorUi.editor.graph,n=[];b.style.position="relative";b.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;
+B.style.verticalAlign="middle";v.appendChild(B);mxUtils.write(v,mxResources.get("property"));u.style.cursor="pointer";var A=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),f;if(q.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;f="none";for(var d=b.childNodes.length-1;0<=d;d--)try{var e=b.childNodes[d],l=e.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||b.removeChild(e)}catch(na){}}else B.src=Sidebar.prototype.expandedImage,f="";for(d=0;d<c.length;d++)c[d].style.display=
+f};mxEvent.addListener(u,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;A()});u.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");u.appendChild(v);y.appendChild(u);var x=!1,F=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var C in c)if(u=
+c[C],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[C]?mxUtils.htmlEntities(f.style[C]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==u.type)F=!F;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var J=u.dependentProps,M=[],D=[],v=0;v<J.length;v++){var E=f.style[J[v]];D.push(c[J[v]].subDefVal);M.push(null!=E?E.split(","):[])}u.dependentPropsDefVal=D;u.dependentPropsVals=
+M}y.appendChild(p(C,z,u,x,F));x=!x}}for(v=0;v<n.length;v++)for(u=n[v],c=u.parentRow,f=0;f<u.values.length;f++)C=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(C,c.nextSibling),c=C;b.appendChild(y);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
+"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="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(" "),m=document.createElement("div");
+m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";m.style.width="210px";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,
+function(){q(b)}))})(k);g.push(p);m.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");this.format.currentScheme=b;t(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),t=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,
+m=0;m<e.length;m++){for(var g=d.getModel().getStyle(e[m]),k=0;k<l.length;k++)g=mxUtils.removeStylename(g,l[k]);var p=d.getModel().isVertex(e[m])?f.initialDefaultVertexStyle:f.initialdefaultEdgeStyle;null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(g=""==b.fill?mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,
+null))),mxEvent.isShiftDown(c)||(g=""==b.stroke?mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!d.getModel().isVertex(e[m])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(e[m])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(e[m],g)}}finally{d.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=
+10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=b){var m="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":
+c.style.backgroundColor=""==b.fill?mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):b.fill||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");c.style.border=b.stroke==mxConstants.NONE?m+" transparent":""==b.stroke?m+" "+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):m+" "+(b.stroke||
+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=b.title&&c.setAttribute("title",b.title)}else{var m=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=m;c.style.border="1px solid "+g}c.style.borderRadius="0";e.appendChild(c)});e.innerHTML="";for(var m=0;m<b.length;m++)0<m&&0==mxUtils.mod(m,
+4)&&mxUtils.br(e),c(b[m])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?28:8,n=document.createElement("div");n.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"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(n,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var y=document.createElement("div");y.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(b.appendChild(n),b.appendChild(y));mxEvent.addListener(y,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(n);c(y);t(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(m);return b};StyleFormatPanel.prototype.addEditOps=function(b){var c=this.format.getSelectionState(),f=null;1==c.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",b.appendChild(f));var d=this.editorUi.editor.graph,d=1==c.cells.length?d.view.getState(c.cells[0]):null;null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",
mxResources.get("editShape")),c.style.marginBottom="2px",null==f?c.style.width="210px":(f.style.width="104px",c.style.width="104px",c.style.marginLeft="2px"),b.appendChild(c)):c.image&&0<c.cells.length&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==f?c.style.width="210px":(f.style.width="104px",c.style.width="104px",c.style.marginLeft="2px"),
@@ -10481,11 +10482,11 @@ q.style.margin="0 4px 0 0";var t=mxUtils.button(mxResources.get("add"),function(
n);m.model.addListener(mxEvent.CHANGE,n);m.addListener(mxEvent.REFRESH,n);var y=document.createElement("div");y.style.boxSizing="border-box";y.style.whiteSpace="nowrap";y.style.position="absolute";y.style.overflow="hidden";y.style.bottom="0px";y.style.height="42px";y.style.right="10px";y.style.left="10px";m.isEnabled()&&(y.appendChild(q),y.appendChild(t),k.appendChild(y));return{div:k,refresh:n}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],c;for(c in Graph.customFontElements){var f=
Graph.customFontElements[c];b.push({name:f.name,url:f.url})}return b};Graph.prototype.setFont=function(b,c){Graph.addFont(b,c);document.execCommand("fontname",!1,b);if(null!=c){var f=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(b,c);for(var d=0;d<f.length;d++)f[d].getAttribute("face")==b&&f[d].getAttribute("data-font-src")!=c&&f[d].setAttribute("data-font-src",c)}};var B=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return B.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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var c in b)this.globalVars[c]=b[c]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
-{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,c,f,d,e,l,m,g,k,p,q,t,n,y){var u=null,v=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var B=D.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var x=B.ownerDocument,C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");
-null!=x.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var F="",z="",M=0;M<A.length;M++){var E=A[M].name,H=A[M].url;Graph.isCssFontUrl(H)?F+="@import url("+H+");\n":z+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+H+'");\n}\n'}C.appendChild(x.createTextNode(F+z));B.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
-function(){var b=G.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=
-d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var E=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){E.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
+{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=
+function(b,c,f,d,e,l,m,g,k,p,q,t,n,y){var u=null,v=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var B=E.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var x=B.ownerDocument,F=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");
+null!=x.setAttributeNS?F.setAttributeNS("type","text/css"):F.setAttribute("type","text/css");for(var C="",z="",M=0;M<A.length;M++){var D=A[M].name,G=A[M].url;Graph.isCssFontUrl(G)?C+="@import url("+G+");\n":z+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+G+'");\n}\n'}F.appendChild(x.createTextNode(C+z));B.getElementsByTagName("defs")[0].appendChild(F)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var D=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+function(){var b=D.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=
+d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var G=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){G.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var I=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){I.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,c){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 f=!1,d=0,e=0,l=mxUtils.bind(this,function(){f||
@@ -10495,9 +10496,9 @@ null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.w
0),this.setCellsVisible(t,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(l(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(l(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));t=[];null!=p.select&&this.isEnabled()&&(t=this.getCellsForAction(p.select),this.setSelectionCells(t));null!=p.highlight&&(t=this.getCellsForAction(p.highlight),
this.highlightCells(t,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(t=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<t.length&&this.scrollCellToVisible(t[0]);if(null!=p.tags){t=[];null!=p.tags.hidden&&(t=t.concat(p.tags.hidden));if(null!=p.tags.visible)for(var n=this.getAllTags(),y=0;y<n.length;y++)0>mxUtils.indexOf(p.tags.visible,n[y])&&0>mxUtils.indexOf(t,n[y])&&t.push(n[y]);this.hiddenTags=t;this.refresh()}0<q.length&&
(d++,this.executeAnimations(q,g,f?1:p.steps,f?0:p.delay));0==d?k():m()}else this.stoppingCustomActions=this.executingCustomActions=!1,m(),null!=c&&c()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,c){var f=this.getLinkForCell(c);null!=f&&"data:action/json,"==f.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(b,f));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var e=d.getElementsByTagName("a"),l=!1,m=0;m<
-e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[m].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(S){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<
+e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[m].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(N){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<
c.length;f++){var d=c[f],e;for(e in d)this.updateCustomLinkAction(b,d[e],"cells"),this.updateCustomLinkAction(b,d[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,c,f){if(null!=c&&null!=c[f]){for(var d=[],e=0;e<c[f].length;e++)if("*"==c[f][e])d.push(c[f][e]);else{var l=b[c[f][e]];null!=l?""!=l&&d.push(l):d.push(c[f][e])}c[f]=d}};Graph.prototype.getCellsForAction=function(b,c){var f=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,c));if(null!=b.excludeCells){for(var d=
-[],e=0;e<f.length;e++)0>b.excludeCells.indexOf(f[e].id)&&d.push(f[e]);f=d}return f};Graph.prototype.getCellsById=function(b){var c=[];if(null!=b)for(var f=0;f<b.length;f++)if("*"==b[f])var d=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(b){return b!=d},d));else{var e=this.model.getCell(b[f]);null!=e&&c.push(e)}return c};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
+[],e=0;e<f.length;e++)0>b.excludeCells.indexOf(f[e].id)&&d.push(f[e]);f=d}return f};Graph.prototype.getCellsById=function(b){var c=[];if(null!=b)for(var f=0;f<b.length;f++)if("*"==b[f])var d=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(b){return b!=d},d));else{var e=this.model.getCell(b[f]);null!=e&&c.push(e)}return c};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,b[c]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,c,f,d){var e=[];if(null!=b){c=null!=c?c:this.model.getDescendants(this.model.getRoot());for(var l=0,m={},g=0;g<b.length;g++)0<b[g].length&&(m[b[g]]=!0,l++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==
this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var k=this.getTagsForCell(c[g]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<l;q++)null!=m[k[q]]&&p++;p=p==l}p&&(1!=d||this.isCellVisible(c[g]))&&e.push(c[g])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var c=null,f=[],d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]),
f=[];if(0<e.length){for(var e=e.split(" "),l={},m=0;m<e.length;m++)if(null==c||null!=c[e[m]])l[e[m]]=!0,f.push(e[m]);c=l}else return[]}return f};Graph.prototype.getTagsForCells=function(b){for(var c=[],f={},d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]);if(0<e.length)for(var e=e.split(" "),l=0;l<e.length;l++)null==f[e[l]]&&(f[e[l]]=!0,c.push(e[l]))}return c};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,c){if(0<
@@ -10520,32 +10521,32 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/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(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var J=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,m,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&
-mxStencilRegistry.getStencil(q)}return J.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){y.value=Math.max(1,Math.min(g,Math.max(parseInt(y.value),parseInt(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(n.value))))}function d(c){function f(c,f,l){var m=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
-c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),n=0,y=0,u=P.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(G.value),C=parseInt(I.value),v=Math.min(u.height*C/(t.height/c.view.scale),u.width*v/(t.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!x&&c.pageVisible?(t=c.getPageLayout(),n-=t.x*u.width,y-=t.y*u.height):
-x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,n,y,x);f.pageSelector=!1;f.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(f.title=n.getTitle());var F=f.writeHead;f.writeHead=function(f){F.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var H=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,m,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&
+mxStencilRegistry.getStencil(q)}return H.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){y.value=Math.max(1,Math.min(g,Math.max(parseInt(y.value),parseInt(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(n.value))))}function d(c){function f(c,f,l){var m=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
+c.view.translate=new mxPoint(0,0),c.view.scale=1);var t=c.getGraphBounds(),n=0,y=0,u=T.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(H.value),F=parseInt(I.value),v=Math.min(u.height*F/(t.height/c.view.scale),u.width*v/(t.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!x&&c.pageVisible?(t=c.getPageLayout(),n-=t.x*u.width,y-=t.y*u.height):
+x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,n,y,x);f.pageSelector=!1;f.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(f.title=n.getTitle());var C=f.writeHead;f.writeHead=function(f){C.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),
f.writeln("</style>"));null!=b.editor.fontCss&&(f.writeln('<style type="text/css">'),f.writeln(b.editor.fontCss),f.writeln("</style>"));for(var d=c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,m=d[e].url;Graph.isCssFontUrl(m)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),f.writeln("</style>"))}};
if("undefined"!==typeof MathJax){var z=f.renderPage;f.renderPage=function(c,f,d,e,l,m){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}n=null;y=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(n=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=y;null!=n&&(e.stylesheet=n,e.refresh())}else{u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";f.backgroundColor=u;f.autoOrigin=x;f.appendGraph(c,v,n,y,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(n=0;n<l.length;n++)y=l[n].name,x=l[n].url,Graph.isCssFontUrl(x)?f.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(f.wnd.document.writeln('<style type="text/css">'),
-f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),f.wnd.document.writeln("</style>"))}m&&(c.useCssTransforms=m,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(L.value)/100;isNaN(d)&&(d=1,L.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=n.value,g=y.value,p=!q.checked,
-t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,G.value,I.value,parseInt(B.value)/100,parseInt(L.value)/100,P.get());else{p&&(p=m==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var x=b.pages[v],m=x==b.currentPage?e:null;if(null==m){var m=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,F=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&
-(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,F=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);m.background=C;m.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;m.pageVisible=g;m.mathEnabled=u;var z=m.getGlobalVariable;m.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(m.container);b.updatePageRoot(x);m.model.setRoot(x.root)}t=
+f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),f.wnd.document.writeln("</style>"))}m&&(c.useCssTransforms=m,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(J.value)/100;isNaN(d)&&(d=1,J.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=n.value,g=y.value,p=!q.checked,
+t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,H.value,I.value,parseInt(B.value)/100,parseInt(J.value)/100,T.get());else{p&&(p=m==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var x=b.pages[v],m=x==b.currentPage?e:null;if(null==m){var m=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,F=null,C=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&
+(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,F=x.viewState.background,C=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);m.background=F;m.backgroundImage=null!=C?new mxImage(C.src,C.width,C.height):null;m.pageVisible=g;m.mathEnabled=u;var z=m.getGlobalVariable;m.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(m.container);b.updatePageRoot(x);m.model.setRoot(x.root)}t=
f(m,t,v!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else t=f(e);null==t?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(p=t.wnd.document,c&&(t.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t));null!=l&&(e.stylesheet=l,e.refresh())}}var e=b.editor.graph,l=document.createElement("div"),m=document.createElement("h3");
m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,c||mxResources.get("print"));l.appendChild(m);var g=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);m=document.createElement("span");
mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var t=q.cloneNode(!0);q.setAttribute("checked","checked");t.setAttribute("value","range");p.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type","number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);m=document.createElement("span");
mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var y=n.cloneNode(!0);p.appendChild(y);mxEvent.addListener(n,"focus",function(){t.checked=!0});mxEvent.addListener(y,"focus",function(){t.checked=!0});mxEvent.addListener(n,"change",f);mxEvent.addListener(y,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(m=0;m<b.pages.length;m++)if(b.currentPage==b.pages[m]){k=m+1;n.value=k;y.value=k;break}n.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),
t.checked=!0):t.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");u.appendChild(v);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";u.appendChild(B);
-mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(A);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),F=C.cloneNode(!0),z=document.createElement("td"),
-M=z.cloneNode(!0),E=z.cloneNode(!0),H=z.cloneNode(!0),D=z.cloneNode(!0),J=z.cloneNode(!0);z.style.textAlign="right";H.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","1");G.setAttribute("min","1");G.setAttribute("type","number");G.style.width="40px";M.appendChild(G);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));E.appendChild(m);mxUtils.write(H,
-mxResources.get("fitToBy"));var I=G.cloneNode(!0);D.appendChild(I);mxEvent.addListener(G,"focus",function(){A.checked=!0});mxEvent.addListener(I,"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));J.appendChild(m);C.appendChild(z);C.appendChild(M);C.appendChild(E);F.appendChild(H);F.appendChild(D);F.appendChild(J);x.appendChild(C);x.appendChild(F);u.appendChild(x);p.appendChild(u);l.appendChild(p);p=document.createElement("div");m=
-document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var P=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";
-L.setAttribute("value","100 %");L.style.width="60px";p.appendChild(L);l.appendChild(p);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&m.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=
+mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(A);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),F=document.createElement("tr"),C=F.cloneNode(!0),z=document.createElement("td"),
+M=z.cloneNode(!0),D=z.cloneNode(!0),E=z.cloneNode(!0),G=z.cloneNode(!0),L=z.cloneNode(!0);z.style.textAlign="right";E.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","1");H.setAttribute("min","1");H.setAttribute("type","number");H.style.width="40px";M.appendChild(H);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));D.appendChild(m);mxUtils.write(E,
+mxResources.get("fitToBy"));var I=H.cloneNode(!0);G.appendChild(I);mxEvent.addListener(H,"focus",function(){A.checked=!0});mxEvent.addListener(I,"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));L.appendChild(m);F.appendChild(z);F.appendChild(M);F.appendChild(D);C.appendChild(E);C.appendChild(G);C.appendChild(L);x.appendChild(F);x.appendChild(C);u.appendChild(x);p.appendChild(u);l.appendChild(p);p=document.createElement("div");m=
+document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var T=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";
+J.setAttribute("value","100 %");J.style.width="60px";p.appendChild(J);l.appendChild(p);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&m.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=
mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)}),u.className="geBtn",m.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";m.appendChild(u);b.editor.cancelFirst||m.appendChild(p);l.appendChild(m);this.container=l};var M=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 b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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 M.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 P=document.createElement("canvas"),T=new Image;T.onload=function(){try{P.getContext("2d").drawImage(T,0,0);var b=P.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=b&&6<b.length}catch(R){}};T.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(L){}})();
+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 T=document.createElement("canvas"),P=new Image;P.onload=function(){try{T.getContext("2d").drawImage(P,0,0);var b=T.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=b&&6<b.length}catch(U){}};P.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(J){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.5.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.5.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="1"==urlParams.dev?"/cache":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&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,d,e,g,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
@@ -10596,17 +10597,17 @@ null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1])),this.pages
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");b={};for(d=0;d<e.length;d++)b[e[d]]=!0;for(var g=this.editor.graph.getModel(),k=g.getChildren(g.root),d=0;d<k.length;d++){var n=k[d];g.setVisible(n,b[n.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,n,v,x,A,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();
var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&z?".drawio":"")+"."+b;if("xml"==b){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,m,"text/xml")}else if("html"==b)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,m,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,
-f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,n,g,v,x,A,z,y);this.editor.graph.pageVisible=d;return l}catch(T){this.handleError(T)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;
-if(n||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),e)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,n,v,x,
+f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,n,g,v,x,A,z,y);this.editor.graph.pageVisible=d;return l}catch(P){this.handleError(P)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;
+if(n||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),e)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,n,v,x,
A,z){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var m="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==c&&(null!=z?p="&from="+z.from+"&to="+z.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(A="1",c="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=
f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};x&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+m+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+A+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+
(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==
b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,m=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+
" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();g()}));k();g()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){e(b)}),mxUtils.bind(this,function(b){null!=d&&d(b)})):e("")};EditorUi.prototype.updateDiagram=function(b){function c(b){var c=new mxCellOverlay(b.image||e.warningImage,
b.tooltip,b.align,b.valign,b.offset);c.addListener(mxEvent.CLICK,function(c,f){d.alert(b.tooltip)});return c}var f=null,d=this;if(null!=b&&0<b.length&&(f=mxUtils.parseXml(b),b=null!=f?f.documentElement:null,null!=b&&"updates"==b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var n=g.getCell(b.getAttribute("id"));if(null!=n){try{var x=b.getAttribute("value");if(null!=x){var A=mxUtils.parseXml(x).documentElement;
-if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(n,A);else for(var z=A.attributes,y=0;y<z.length;y++)e.setAttributeForCell(n,z[y].nodeName,0<z[y].nodeValue.length?z[y].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+n.id+": "+H)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(n,B)}catch(H){null!=window.console&&console.log("Error in style for "+n.id+": "+H)}try{var C=b.getAttribute("icon");if(null!=C){var D=0<C.length?JSON.parse(C):null;null!=
-D&&D.append||e.removeCellOverlays(n);null!=D&&e.addCellOverlay(n,c(D))}}catch(H){null!=window.console&&console.log("Error in icon for "+n.id+": "+H)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),E=e.getCellGeometry(n);if(null!=E){E=E.clone();for(key in G){var F=parseFloat(G[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(G[key])}e.model.setGeometry(n,E)}}}catch(H){null!=window.console&&console.log("Error in icon for "+n.id+
-": "+H)}}}else if("model"==b.nodeName){for(var I=b.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(b.firstChild)).decode(I,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(k=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
+if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(n,A);else for(var z=A.attributes,y=0;y<z.length;y++)e.setAttributeForCell(n,z[y].nodeName,0<z[y].nodeValue.length?z[y].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+n.id+": "+L)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(n,B)}catch(L){null!=window.console&&console.log("Error in style for "+n.id+": "+L)}try{var C=b.getAttribute("icon");if(null!=C){var E=0<C.length?JSON.parse(C):null;null!=
+E&&E.append||e.removeCellOverlays(n);null!=E&&e.addCellOverlay(n,c(E))}}catch(L){null!=window.console&&console.log("Error in icon for "+n.id+": "+L)}try{var D=b.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),G=e.getCellGeometry(n);if(null!=G){G=G.clone();for(key in D){var F=parseFloat(D[key]);"dx"==key?G.x+=F:"dy"==key?G.y+=F:"dw"==key?G.width+=F:"dh"==key?G.height+=F:G[key]=parseFloat(D[key])}e.model.setGeometry(n,G)}}}catch(L){null!=window.console&&console.log("Error in icon for "+n.id+
+": "+L)}}}else if("model"==b.nodeName){for(var I=b.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(b.firstChild)).decode(I,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(k=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
1);b=b.nextSibling}}finally{g.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return f};EditorUi.prototype.getCopyFilename=function(b,c){var f=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),n=l.getHours(),A=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+n+"-"+A+"-"+l));return f=mxResources.get("copyOf",[f])+d};
EditorUi.prototype.fileLoaded=function(b,c){var f=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),f.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=f&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
this.setBackgroundImage(null);!c&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);
@@ -10624,22 +10625,22 @@ d,f.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get(
function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(b){m(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<
e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";k.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("close"));n.setAttribute("valign","absmiddle");n.setAttribute("border","0");n.style.position="relative";n.style.top=
"2px";n.style.width="14px";n.style.cursor="pointer";n.style.margin="0 3px";Editor.isDarkMode()&&(n.style.filter="invert(100%)");var y=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=y?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));
-if(b.isEditable()){var B=this.editor.graph,C=null,D=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),G=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=n.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=
+if(b.isEditable()){var B=this.editor.graph,C=null,E=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),D=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=n.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=
18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=n.cloneNode(!1),y.setAttribute("src",Editor.saveImage),y.setAttribute("title",mxResources.get("save")),p.insertBefore(y,p.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),E=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=B.getCellGeometry(b[m]);null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
-w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);G(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),F=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;
-f.y-=B.view.translate.y;E(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",B.panningManager.stop(),B.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler&&
+y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),G=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=B.getCellGeometry(b[m]);null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);D(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),F=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;
+f.y-=B.view.translate.y;G(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",B.panningManager.stop(),B.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler&&
(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,B.panningManager.stop(),B.graphHandler.reset(),B.isMouseDown=!1,B.autoScroll=!0,F(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.graphHandler.first&&(B.graphHandler.resume(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",B.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,
"dragover",mxUtils.bind(this,function(b){g.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.cursor="";g.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,n,q,t,y){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,E(f,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null);else{var u=!1,B=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=
-JSON.parse(mxUtils.getTextContent(e.documentElement));m(k,g);c=c.concat(k);G(b);this.spinner.stop();u=!0}catch(ma){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var n=this.stringToCells(Editor.getDiagramNodeXml(p[k])),q=this.editor.graph.getBoundingBoxFromGeometry(n);E(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(ma){null!=window.console&&console.log("error in drop handler:",ma)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,G(f,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null);else{var u=!1,B=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=
+JSON.parse(mxUtils.getTextContent(e.documentElement));m(k,g);c=c.concat(k);D(b);this.spinner.stop();u=!0}catch(oa){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var n=this.stringToCells(Editor.getDiagramNodeXml(p[k])),q=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(oa){null!=window.console&&console.log("error in drop handler:",oa)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)});null!=y&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(y,function(b){B(b,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,q)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?B(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));n=n.cloneNode(!1);n.setAttribute("src",Editor.editImage);n.setAttribute("title",mxResources.get("edit"));p.insertBefore(n,p.firstChild);mxEvent.addListener(n,"click",D);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==
-g&&D(b)});e=n.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));n=n.cloneNode(!1);n.setAttribute("src",Editor.editImage);n.setAttribute("title",mxResources.get("edit"));p.insertBefore(n,p.firstChild);mxEvent.addListener(n,"click",E);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==
+g&&E(b)});e=n.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
mxEvent.consume(b)})),p.insertBefore(e,p.firstChild))}k.appendChild(p);k.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var f=0;f<b.length;f++){var d=b[f],e=d.data;if(null!=e){var e=this.convertDataUri(e),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),
0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.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="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-"#2a2a2a",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";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
+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.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";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",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(b,c,d,e,g){b=new ImageDialog(this,b,c,d,e,g);this.showDialog(b.container,
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,c){if(!c){var f=new ChangePageSetup(this,null,b);f.ignoreColor=!0;this.editor.graph.model.execute(f)}});var f=new BackgroundImageDialog(this,b,c);this.showDialog(f.container,360,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(b,c,d,e,g){b=new LibraryDialog(this,b,c,d,e,g);this.showDialog(b.container,640,440,!0,!1,
mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position=
@@ -10665,7 +10666,7 @@ null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewW
"_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},2E4),f.click(),f.parentNode.removeChild(f)}catch(x){}}else this.createEchoRequest(b,c,d,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,d,e,g,k){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=k?"&base64="+k:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
function(b,c){c=c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,n=Math.min(k+1024,d),A=Array(n-k),z=0;k<n;++z,++k)A[z]=f[k].charCodeAt(0);l[g]=new Uint8Array(A)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,n,v){k=null!=k?k:!1;n=null!=n?n:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==
f)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(b,d,e);else if(null!=d&&"text/html"==d.substring(0,9)){var l=new EmbedDialog(this,b);this.showDialog(l.container,440,240,!0,!0);l.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),g.document.close())}else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(b,c,d,e,null,v):null!=c&&0<c.length&&this.pickFolder(f,mxUtils.bind(this,function(l){try{this.exportFile(b,
-c,d,e,f,l)}catch(D){this.handleError(D)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,n,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,420,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
+c,d,e,f,l)}catch(E){this.handleError(E)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,n,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,420,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
b+"</html>"):(b=d?b:btoa(unescape(encodeURIComponent(b))),f.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):f.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),f.document.close())};var c=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(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=b(mxUtils.bind(this,function(b){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=
@@ -10683,7 +10684,7 @@ function(b,c,d,e,g,k,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var
mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,420,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,n,v,x,A,z,y,B,C){if(this.spinner.spin(document.body,
mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var m=this.editor.graph.getSvg(l,b,n,v,null,d,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0,z,y);e&&this.editor.graph.addSvgShadow(m);var p=this.getBaseFilename()+(g?".drawio":"")+".svg";C=null!=C?C:mxUtils.bind(this,function(b){this.isLocalFileSave()||
b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",this.getFileData(!0,null,null,null,d,x,null,null,null,!1));C(Graph.xmlDeclaration+"\n"+(g?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(m);
-var t=mxUtils.bind(this,function(b){k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});B?this.embedFonts(m,t):(this.editor.addFontCss(m),t(m))}catch(J){this.handleError(J)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,n){return this.addCheckbox(b,d,e,g,k,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",
+var t=mxUtils.bind(this,function(b){k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});B?this.embedFonts(m,t):(this.editor.addFontCss(m),t(m))}catch(H){this.handleError(H)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,n){return this.addCheckbox(b,d,e,g,k,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",
n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();f.id=n;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",n),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),
e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");l.style.width="120px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));l.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");l.appendChild(d);b.appendChild(l);
mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if("custom"==l.value){var b=new FilenameDialog(this,e,mxResources.get("ok"),function(b){null!=b?e=b:l.value="blank"},mxResources.get("url"),null,null,null,null,function(){l.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==c||c.checked)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return f.checked?
@@ -10698,29 +10699,29 @@ f.resize=!0);v&&d.push("layers");x&&d.push("tags");0<d.length&&(A&&d.push("light
EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("html"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var g=
document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");l=m.cloneNode(!0);l.setAttribute("value","copy");g.appendChild(l);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);
mxUtils.br(g);g.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var p=this.getCurrentFile();null==d&&null!=p&&p.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));l.setAttribute("checked",
-"checked");null==d&&m.setAttribute("disabled","disabled");f.appendChild(g);var n=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(f,mxResources.get("allPages"),
-g,!g),G=this.addCheckbox(f,mxResources.get("layers"),!0),E=this.addCheckbox(f,mxResources.get("tags"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,F),H=I.getEditInput();H.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,
-mxUtils.bind(this,function(){e(m.checked?d:null,y.checked,B.value,n.getTarget(),n.getColor(),C.checked,D.checked,G.checked,E.checked,F.checked,I.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+"checked");null==d&&m.setAttribute("disabled","disabled");f.appendChild(g);var n=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(f,mxResources.get("allPages"),
+g,!g),D=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("tags"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),I=this.addEditButton(f,F),L=I.getEditInput();L.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");L.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,
+mxUtils.bind(this,function(){e(m.checked?d:null,y.checked,B.value,n.getTarget(),n.getColor(),C.checked,E.checked,D.checked,G.checked,F.checked,I.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
f.appendChild(l);var m=this.getCurrentFile(),l="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=m&&m.constructor==window.DriveFile&&!c){b=80;var l="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));
p.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));n.style.marginTop="12px";n.className="geBtn";p.appendChild(n);f.appendChild(p);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("check"));p.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=d||null!=e)b+=30,mxUtils.write(f,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight=
-"16px",q.style.marginBottom="10px",q.value="100%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",f.appendChild(t),mxUtils.br(f);var C=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var D=null;if(null==m||m.constructor!=window.DriveFile||c)D=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(f,
-mxResources.get("lightbox"),!0,null,null,!k),E=this.addEditButton(f,G),F=E.getEditInput();k&&(F.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=20);var I=this.addCheckbox(f,mxResources.get("layers"),!0);I.style.marginLeft=F.style.marginLeft;I.style.marginTop="8px";var H=this.addCheckbox(f,mxResources.get("tags"),!0);H.style.marginLeft=F.style.marginLeft;H.style.marginBottom="16px";H.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(I.removeAttribute("disabled"),
-F.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&G.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==D?!0:D.checked,G.checked,E.getLink(),I.checked,null!=q?q.value:null,null!=t?t.value:null,H.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);
+"16px",q.style.marginBottom="10px",q.value="100%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",f.appendChild(t),mxUtils.br(f);var C=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==m||m.constructor!=window.DriveFile||c)E=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var D=this.addCheckbox(f,
+mxResources.get("lightbox"),!0,null,null,!k),G=this.addEditButton(f,D),F=G.getEditInput();k&&(F.style.marginLeft=D.style.marginLeft,D.style.display="none",b-=20);var I=this.addCheckbox(f,mxResources.get("layers"),!0);I.style.marginLeft=F.style.marginLeft;I.style.marginTop="8px";var L=this.addCheckbox(f,mxResources.get("tags"),!0);L.style.marginLeft=F.style.marginLeft;L.style.marginBottom="16px";L.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(I.removeAttribute("disabled"),
+F.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==E?!0:E.checked,D.checked,G.getLink(),I.checked,null!=q?q.value:null,null!=t?t.value:null,L.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);
null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):C.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(g?"10":"4")+"px";f.appendChild(l);if(g){mxUtils.write(f,mxResources.get("zoom")+
":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";f.appendChild(k);mxUtils.write(f,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";f.appendChild(m);mxUtils.br(f)}var p=this.addCheckbox(f,
mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),l=this.editor.graph,q=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=q&&(q.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(k.value)/100||1,c=parseInt(m.value)||0;d(!p.checked,null!=n?n.checked:!1,null!=
q?q.checked:!1,b,c)}),null,b,c);this.showDialog(b.container,300,(g?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,d,e,g,k,n,v,x){n=null!=n?n:Editor.defaultIncludeDiagram;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,m="jpeg"==v?220:300,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var q=
document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";f.appendChild(t);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("selectionOnly"),
-!1,l.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.style.marginLeft="24px";E.setAttribute("disabled","disabled");E.setAttribute("type","checkbox");var F=document.createElement("select");F.style.marginTop="16px";F.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(b[p]));I.setAttribute("value",
-b[p]);F.appendChild(I)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(F),mxUtils.br(f),m+=26,mxEvent.addListener(F,"change",function(){"selectionOnly"==F.value&&(u.checked=!0)})):k&&(f.appendChild(E),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
-"none",m-=30):(F.value="diagram",E.setAttribute("checked","checked"),E.defaultChecked=!0,mxEvent.addListener(u,"change",function(){F.value=u.checked?"selectionOnly":"diagram"}));var H=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";
-P.setAttribute("type","checkbox");E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");c&&(f.appendChild(P),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),f.appendChild(E),mxUtils.write(f,mxResources.get("embedFonts")),mxUtils.br(f),m+=60);var T=null;if("png"==v||"jpeg"==v)T=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,
-!1,!0),m+=30;var L=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);L.style.marginBottom="16px";var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));R.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));
-R.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));R.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(R),mxUtils.br(f),mxUtils.br(f),m+=50);d=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,H.checked,!u.checked,M.checked,L.checked,P.checked,t.value,E.checked,!1,R.value,null!=T?T.checked:null,null!=J?J.checked:
-null,F.value,E.checked)}),null,d,e);this.showDialog(d.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var k=document.createElement("h3");mxUtils.write(k,c);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-f.appendChild(k)}var m=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),n=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addEditButton(f,q),C=B.getEditInput(),D=1<l.model.getChildCount(l.model.getRoot()),G=this.addCheckbox(f,mxResources.get("layers"),D,!D);G.style.marginLeft=C.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?
-(D&&G.removeAttribute("disabled"),C.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,q.checked,B.getLink(),G.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+!1,l.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");var F=document.createElement("select");F.style.marginTop="16px";F.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(b[p]));I.setAttribute("value",
+b[p]);F.appendChild(I)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(F),mxUtils.br(f),m+=26,mxEvent.addListener(F,"change",function(){"selectionOnly"==F.value&&(u.checked=!0)})):k&&(f.appendChild(G),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
+"none",m-=30):(F.value="diagram",G.setAttribute("checked","checked"),G.defaultChecked=!0,mxEvent.addListener(u,"change",function(){F.value=u.checked?"selectionOnly":"diagram"}));var L=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),T=document.createElement("input");T.style.marginTop="16px";T.style.marginRight="8px";
+T.setAttribute("type","checkbox");G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||T.setAttribute("disabled","disabled");c&&(f.appendChild(T),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),f.appendChild(G),mxUtils.write(f,mxResources.get("embedFonts")),mxUtils.br(f),m+=60);var P=null;if("png"==v||"jpeg"==v)P=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,
+!1,!0),m+=30;var J=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);J.style.marginBottom="16px";var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));U.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));
+U.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));U.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(U),mxUtils.br(f),mxUtils.br(f),m+=50);d=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,L.checked,!u.checked,M.checked,J.checked,T.checked,t.value,G.checked,!1,U.value,null!=P?P.checked:null,null!=H?H.checked:
+null,F.value,G.checked)}),null,d,e);this.showDialog(d.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var k=document.createElement("h3");mxUtils.write(k,c);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(k)}var m=this.addCheckbox(f,mxResources.get("fit"),!0),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),n=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addEditButton(f,q),C=B.getEditInput(),E=1<l.model.getChildCount(l.model.getRoot()),D=this.addCheckbox(f,mxResources.get("layers"),E,!E);D.style.marginLeft=C.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?
+(E&&D.removeAttribute("disabled"),C.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,q.checked,B.getLink(),D.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
function(b,c,d,e,g,k,n,v){function f(c){var f=" ",p="";e&&(f=" 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!=m?"&page="+m:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",p+=
"cursor:pointer;");b&&(p+="max-width:100%;");var q="";d&&(q=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');n('<img src="'+c+'"'+q+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds(),m=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=e?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");f(b)}),null,null,null,mxUtils.bind(this,function(b){v({message:mxResources.get("unknownError")})}),
null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),l.width*l.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";d&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};
@@ -10735,15 +10736,15 @@ arguments)};document.body.appendChild(f.container);f.model.setRoot(n.root)}this.
c(b)}),null,null,e,null,f.shadowVisible,null,f,g,null,null,null,"diagram",null)}catch(z){null!=c&&c(z)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,n,v,x,A,z,y,B){v=null!=v?v:!0;n=null!=x?x:c.background;n==mxConstants.NONE&&(n=null);k=c.getSvg(n,A,z,null,null,k,null,null,null,c.shadowVisible||y,null,B,"diagram");(c.shadowVisible||y)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);var f=mxUtils.bind(this,function(b){b=(e?"":Graph.xmlDeclaration+
"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=g&&g(b);return b});c.mathEnabled&&this.editor.addMathCss(k);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){f(b)})):f(b)}));else return f(k)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,
function(f){try{null!=f&&this.editor.addFontCss(b,f),c(b)}catch(p){c(b)}}))}catch(m){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,d,e,g,k,n,v,x,A,z,y,B){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):
-null,x,null==this.pages||0==this.pages.length,z)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,n,A,y,B)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,n){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();
+null,x,null==this.pages||0==this.pages.length,z)}catch(D){this.handleError(D)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,n,A,y,B)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,n){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();
try{var m=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var q=p.getElementsByTagName("diagram");if(1==q.length&&!k){if(p=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&
-""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){k=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),e=!1,u=1);for(;u<q.length;u++){var D=q[u].getAttribute("id");q[u].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(q[u]));b[D]=q[u].getAttribute("id");var E=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",
-[E+1]));l.model.execute(new ChangePage(this,G,G,E,!0));k.push(G)}this.updatePageLinks(b,k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(u=0;u<f.length;u++)this.updatePageLinksForCell(b,f[u]);n&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(F){if(g)throw F;this.handleError(F)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var f=0;f<c.length;f++)this.updatePageLinksForCell(b,
+""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){k=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),e=!1,u=1);for(;u<q.length;u++){var E=q[u].getAttribute("id");q[u].removeAttribute("id");var D=this.updatePageRoot(new DiagramPage(q[u]));b[E]=q[u].getAttribute("id");var G=this.pages.length;null==D.getName()&&D.setName(mxResources.get("pageWithNumber",
+[G+1]));l.model.execute(new ChangePage(this,D,D,G,!0));k.push(D)}this.updatePageLinks(b,k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(u=0;u<f.length;u++)this.updatePageLinksForCell(b,f[u]);n&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(F){if(g)throw F;this.handleError(F)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var f=0;f<c.length;f++)this.updatePageLinksForCell(b,
c[f].root)};EditorUi.prototype.updatePageLinksForCell=function(b,c){var f=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(c);null!=e&&d.setLinkForCell(c,this.updatePageLink(b,e));if(d.isHtmlLabel(c)){f.innerHTML=d.sanitizeHtml(d.getLabel(c));for(var l=f.getElementsByTagName("a"),g=!1,k=0;k<l.length;k++)e=l[k].getAttribute("href"),null!=e&&(l[k].setAttribute("href",this.updatePageLink(b,e)),g=!0);g&&d.labelChanged(c,f.innerHTML)}for(k=0;k<d.model.getChildCount(c);k++)this.updatePageLinksForCell(b,
d.model.getChildAt(c,k))};EditorUi.prototype.updatePageLink=function(b,c){if(Graph.isPageLink(c)){var f=b[c.substring(c.indexOf(",")+1)];c=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==c.substring(0,17))try{var d=JSON.parse(c.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var l=d.actions[e];if(null!=l.open&&Graph.isPageLink(l.open)){var g=l.open.substring(l.open.indexOf(",")+1),f=b[g];null!=f?l.open="data:page/id,"+f:null==this.getPageById(g)&&delete l.open}}c=
"data:action/json,"+JSON.stringify(d)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+
1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(y){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",b,e);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));
-n.responseType="blob";this.addRemoteServiceSecurityCheck(n);null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(D){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==n.responseType||"text"==n.responseType?
+n.responseType="blob";this.addRemoteServiceSecurityCheck(n);null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(E){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==n.responseType||"text"==n.responseType?
d({message:n.responseText}):(f=new FileReader,f.onload=function(){d({message:JSON.parse(f.result).Message})},f.readAsText(n.response))}catch(C){d({})}});n.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(y){d(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=
d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,d)}catch(q){d(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(b){var c=mxUtils.bind(this,function(){this.loadingExtensions=
!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,
@@ -10770,23 +10771,23 @@ function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):d()
d,e,A,null,null!=y?mxEvent.isControlDown(y):null);null!=v&&v(c)});"image"==c.substring(0,5)?(x=!1,"image/png"==c.substring(0,9)&&(c=z?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,A,null,null!=y?mxEvent.isControlDown(y):null),x=!0)),x||(c=this.editor.graph,z=b.indexOf(";"),0<z&&(b=b.substring(0,z)+b.substring(b.indexOf(",",z+1))),A&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,m)):null!=x&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(f=!0,this.importVisio(x,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(f=!0,this.parseFile(null!=x?x:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?m(b.responseText):null!=v&&v(null))}),n)):0==b.indexOf("PK")&&null!=x?(f=!0,this.importZipFile(x,
m,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A,null,null!=y?mxEvent.isControlDown(y):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,n,v,x,A,z,y,B){e=null!=e?e:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){m=!0;break}var t=mxUtils.bind(this,function(){var m=this.editor.graph,p=m.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,m,n,f,y,B)}catch(ba){return this.handleError(ba),null}});k=null!=k?k:mxUtils.bind(this,function(b){m.setSelectionCells(b)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],F=mxUtils.bind(this,function(b,c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];m.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),C=0;C<q;C++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(k))if("image/"==k.type.substring(0,
+null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){m=!0;break}var t=mxUtils.bind(this,function(){var m=this.editor.graph,p=m.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,m,n,f,y,B)}catch(qa){return this.handleError(qa),null}});k=null!=k?k:mxUtils.bind(this,function(b){m.setSelectionCells(b)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],F=mxUtils.bind(this,function(b,c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];m.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),x=0;x<q;x++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(k))if("image/"==k.type.substring(0,
6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=y?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?F(f,
mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=B){var b=B.getElementsByTagName("svg");if(0<b.length){var l=b[0],n=l.getAttribute("width"),y=l.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+n+" "+y);else if(isNaN(n)||isNaN(y)){var v=u.split(" ");3<v.length&&(n=parseFloat(v[2]),y=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));
-var F=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,y)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(n*F)),Math.max(1,Math.round(y*F)),k.name);if(isNaN(n)||isNaN(y)){var C=new Image;C.onload=mxUtils.bind(this,function(){n=Math.max(1,C.width);y=Math.max(1,C.height);A[0].geometry.width=n;A[0].geometry.height=y;l.setAttribute("viewBox","0 0 "+n+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));m.setCellStyles("image",
-q,[A[0]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(ca){}return null})):F(f,mxUtils.bind(this,function(){return g(v,"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else F(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var C=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&0<C.length){var x=new Image;x.src=b.target.result;F(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,x.width,x.height,k.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?
+var F=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,y)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(n*F)),Math.max(1,Math.round(y*F)),k.name);if(isNaN(n)||isNaN(y)){var x=new Image;x.onload=mxUtils.bind(this,function(){n=Math.max(1,x.width);y=Math.max(1,x.height);A[0].geometry.width=n;A[0].geometry.height=y;l.setAttribute("viewBox","0 0 "+n+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));m.setCellStyles("image",
+q,[A[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(ba){}return null})):F(f,mxUtils.bind(this,function(){return g(v,"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else F(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var x=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=x&&0<x.length){var C=new Image;C.src=b.target.result;F(f,mxUtils.bind(this,function(){return g(x,"text/xml",c+f*p,d+f*p,C.width,C.height,k.name)}));u=!0}}u||(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(b.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,b.target.result,mxUtils.bind(this,function(b,m,n){F(f,mxUtils.bind(this,function(){if(null!=b&&b.length<A){var q=l&&this.isResampleImageSize(k.size,z)?Math.min(1,Math.min(e/
m,e/n)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(m*q),Math.round(n*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),l,e,z,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,function(b){F(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){F(f,
-function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(C)});if(m){m=[];for(q=0;q<b.length;q++)m.push(b[q]);b=m;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?
+function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(x)});if(m){m=[];for(q=0;q<b.length;q++)m.push(b[q]);b=m;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?
e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){e(b,!0)},function(b){e(b,!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):e(!1,f)};EditorUi.prototype.parseFile=function(b,c,
d){d=null!=d?d:b.name;var f=new FormData;f.append("format","xml");f.append("upfile",b,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,n){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);
-if(e&&this.isResampleImageSize(null!=n?n:c.length,k))try{var m=Math.max(f/g,l/g);if(1<m){var p=Math.round(f/m),q=Math.round(l/m),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var u=t.toDataURL();if(u.length<c.length){var D=document.createElement("canvas");D.width=p;D.height=q;var G=D.toDataURL();u!==G&&(c=u,f=p,l=q)}}}catch(E){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
-function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var k=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:
+if(e&&this.isResampleImageSize(null!=n?n:c.length,k))try{var m=Math.max(f/g,l/g);if(1<m){var p=Math.round(f/m),q=Math.round(l/m),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var u=t.toDataURL();if(u.length<c.length){var E=document.createElement("canvas");E.width=p;E.height=q;var D=E.toDataURL();u!==D&&(c=u,f=p,l=q)}}}catch(G){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
+function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&"1"!=urlParams.embedInline&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:
"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(f,g.format,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==
g.format)c.labelChanged(d,"<pre>"+e+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(e),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:f,format:g.format}))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};c.cellEditor.editMermaidData=function(d,f,e){var g=JSON.parse(e);
f=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(f,g.config,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,config:g.config},null,2))}finally{c.getModel().endUpdate()}},
-function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):d.apply(this,arguments)}}catch(J){b.handleError(J)}};
+function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):d.apply(this,arguments)}}catch(H){b.handleError(H)}};
c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(I){b.handleError(I)}return d};var e=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var c=e.apply(this,arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var g=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,b.currentPage,this));g.apply(this,
arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();
break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(c,d){var f=n.apply(this,arguments);if(null!=f&&null!=f.originalSrc)if(!d)f={src:f.originalSrc};else if(d&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var e=this.stylesheet;this.stylesheet=this.getDefaultStylesheet();f=b.createImageForPageLink(f.originalSrc);this.stylesheet=e}return f};var u=this.clearDefaultStyle;this.clearDefaultStyle=function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||
@@ -10801,9 +10802,9 @@ b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b)
/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var f=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,f)),e/Math.max(1,b));c.insertImage(decodeURIComponent(d),f*e,b*e)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,
"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));this.isSettingsEnabled()&&(C=this.editor.graph.view,C.setUnit(mxSettings.getUnit()),C.addListener("unitChanged",function(b,c){mxSettings.setUnit(c.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,
C.unit),this.refresh());if("1"==urlParams.styledev){C=document.getElementById("geFooter");null!=C&&(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)})),C.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
-this.styleInput?!0:D.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),G=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f=c.view.translate,e=c.view.scale,g=d.x/e-f.x,l=d.y/e-f.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,
+this.styleInput.value)})),C.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
+this.styleInput?!0:E.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var D=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=D&&(D.parentNode.removeChild(D),D=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=this.highlightElement(c.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=D&&(D.parentNode.removeChild(D),D=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f=c.view.translate,e=c.view.scale,g=d.x/e-f.x,l=d.y/e-f.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,
g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=
c.sanitizeHtml(m);var n=null,f=d.getElementsByTagName("img");null!=f&&1==f.length?(m=f[0].getAttribute("src"),null==m&&(m=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?m=f[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=
m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*f,b*f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
@@ -10814,92 +10815,96 @@ this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==f.nodeName||"TEXTAREA"==f.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||e||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",
c.container.appendChild(d),e=!0,d.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var f=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=f&&17!=f&&91!=f&&93!=f||(e=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(f){if(c.isEnabled())try{mxClipboard.copy(c),
this.copyCells(d),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(f){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(d.innerHTML="&nbsp;",d.focus(),null!=b.clipboardData&&this.pasteCells(b,d,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,d,!1,
-!0)}),0))}),!0);var g=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==d?!0:g.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);mxSettings.settings.sketchMode=b;mxSettings.save();this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(b){Editor.pagesVisible!=
-b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.doSetSketchMode=function(b){if(Editor.sketchMode!=b){var c=this.editor.graph;Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=20;c.defaultVertexStyle={pointerEvents:"0",fontSize:"20"};c.defaultEdgeStyle={fontSize:"16",edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
-endArrow:"open",endSize:"14",startSize:"14"};b&&(c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultVertexStyle.hachureGap="4",c.defaultVertexStyle.sketch="1",c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.hachureGap="4",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8",this.menus.defaultFonts=
-[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(this.menus.defaultFonts));this.initialDefaultVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=
-mxUtils.clone(c.defaultEdgeStyle);Graph.prototype.defaultVertexStyle=c.defaultVertexStyle;Graph.prototype.defaultEdgeStyle=c.defaultEdgeStyle;this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(b){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var d=b.indexOf(",");0<d&&(c=this.getPageById(b.substring(d+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=
-function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");if(b=this.getPageById(b.substring(c+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};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(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);
-else{var d=c.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(b,c){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(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){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(b,c){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(b,c,d){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var f=this.createImageDataUri(b,c,"png"),e=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));
-this.writeImageToClipboard(f,e,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(p){this.handleError(p)}};EditorUi.prototype.writeImageToClipboard=function(b,c,d,e){var f=this.base64ToBlob(b.substring(b.indexOf(",")+
-1),"image/png");b=new ClipboardItem({"image/png":f,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var f=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(f));mxUtils.setTextContent(b,encodeURIComponent(e));c?(d.removeCells(f,!1),d.lastPasteXml=null):(d.lastPasteXml=
-e,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,
-f.pasteCounter=0);var k=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,k,k),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){k=f.getStartEditingCell(f.getSelectionCell(),e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,b,[k]);else{f.model.beginUpdate();try{f.labelChanged(k,b),Graph.isLink(b)&&f.setLinkForCell(k,b)}finally{f.model.endUpdate()}}f.setSelectionCell(k)}else g=
-f.getInsertPoint(),f.isMouseInsertPoint()&&(k=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),
-l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,l))}k=f.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),
-null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var n=g.lastIndexOf("%3E");0<=n&&n<
-g.length-3&&(g=g.substring(0,n+3))}catch(y){}try{k=f.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(m)&&(l=!0,g=m)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;p.lastPasteXml=null;p.pasteCounter=0}}catch(y){this.handleError(y)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=
-null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[d],"drop",mxUtils.bind(this,function(b){null!=c&&
-(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(b);if(null==d){var f=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?
-d=f.getData("Text"):(d=null,d=0<=mxUtils.indexOf(f.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=d&&0<d.length?(f=document.createElement("div"),f.innerHTML=this.editor.graph.sanitizeHtml(d),f=f.getElementsByTagName("img"),0<f.length&&(d=f[0].getAttribute("src"))):0<=mxUtils.indexOf(f.types,"text/plain")&&(d=f.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),
-null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var c=0,d=0,f,e;if(null==b){e=document.body;var g=document.documentElement;f=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else c=b.offsetTop,d=b.offsetLeft,f=b.clientWidth,e=b.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";
-g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=d+"px";g.style.width=Math.max(0,f-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var c=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=c){var d=new mxCodec(c.ownerDocument),f=new mxGraphModel;d.decode(c,
-f);c=f.getChildAt(f.getRoot(),0);for(d=0;d<f.getChildCount(c);d++)b.push(f.getChildAt(c,d))}return b};EditorUi.prototype.openFileHandle=function(b,c,d,e,g){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var f=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(Graph.fileSupport&&
-!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(d,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?f(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();
-this.openLocalFile(b,c,e)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,d.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}),
-mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,e)}));else{if("image/png"==d.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==d.type){var k=Editor.extractGraphModelFromPdf(b);null!=k&&(g=null,e=!0,b=k)}this.spinner.stop();this.openLocalFile(b,c,e,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;
-d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,d,e,g){var f=this.getCurrentFile(),k=mxUtils.bind(this,function(){window.openFile=null;if(null==
-c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var f=mxUtils.parseXml(b);null!=f&&(this.editor.setGraphXml(f.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,d,e,g))});if(null!=b&&0<b.length)null==f||!f.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)?k():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)&&null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),
-mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),
-this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],d;for(d in b)c.push(d);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var f=this.editor.graph,e=f.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));f.model.isEdge(b)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),
-d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=f.model.getChildCount(b),g=0;g<e;g++)this.addBasenamesForCell(f.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&
-(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(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);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,d,e){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,
-b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(e)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var g=f.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
-this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var c=this.editor.graph;return{event:b,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var c=null,d=!1,f=!1,e=null,g=mxUtils.bind(this,function(b,c){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,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,m=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==
-b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(oa){}return b});if("json"==urlParams.proto){var n=!1;try{l=JSON.parse(l)}catch(Z){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):
-l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("layout"==l.action){this.executeLayoutList(l.layouts);return}if("prompt"==l.action){this.spinner.stop();var p=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):l.ok,function(b){null!=b?k.postMessage(JSON.stringify({event:"prompt",value:b,message:l}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,
-300,80,!0,!1);p.init();return}if("draft"==l.action){var q=m(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):
-null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(Z){k.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&
-!l.templatesOnly&&null!=l.callback){var F=this.getCurrentUser(),x=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=F?F.id:null,t?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,
-u?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(x.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,function(c,d,f,e){c=
-c||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:d,tempUrl:f,libs:e,builtIn:!0,message:l}),"*"):(b(c,g,c!=this.emptyDiagramXml,l.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(b,c){this.remoteInvoke("searchDiagrams",
-[b,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,c,d){k.postMessage(JSON.stringify({event:"template",docUrl:b,info:c,name:d}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==l.action){var H=
-this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:H,message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var J=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,J):
-this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var M=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,T=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=l.format;c.message=l;c.data=b;c.xml=M;k.postMessage(JSON.stringify(c),
-"*")}),L=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(M)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);T(b)}),R=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var K=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=R){var b=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());
-for(var c,d=0;d<this.pages.length;d++)if(this.pages[d].getId()==R){c=this.updatePageRoot(this.pages[d]);break}null==c&&(c=this.currentPage);P.getGlobalVariable=function(d){return"page"==d?c.getName():"pagenumber"==d?1:b.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(c.root)}if(null!=l.layerIds){for(var f=P.model,e=f.getChildCells(f.getRoot()),g={},d=0;d<l.layerIds.length;d++)g[l.layerIds[d]]=!0;for(d=0;d<e.length;d++)f.setVisible(e[d],g[e[d].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){L(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){L(null)}),null,null,l.scale,l.transparent,l.shadow,null,P,l.border,null,l.grid,l.keepTheme)});null!=l.xml&&0<l.xml.length?(d=!0,this.setFileData(M),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(K)},0):K()):K()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+
-encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?T("data:image/png;base64,"+b.getText()):L(null)}),mxUtils.bind(this,function(){L(null)}))}}else K=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var c=
-this.getXmlFileData();b.xml=mxUtils.getXml(c);b.data=this.getFileData(null,null,!0,null,null,null,c);b.format=l.format}else if("html"==l.format)c=this.editor.getGraphXml(),b.data=this.getHtml(c,this.editor.graph),b.xml=mxUtils.getXml(c),b.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;c=null!=l.background?l.background:this.editor.graph.background;c==mxConstants.NONE&&(c=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var d=mxUtils.bind(this,
-function(c){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(c);k.postMessage(JSON.stringify(b),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(b.xml,this.editor.graph,null,!0,d,null,null,l.embedImages,c,l.scale,l.border,l.shadow,l.keepTheme);else if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):
-l.spin))this.editor.graph.setEnabled(!1),c=this.editor.graph.getSvg(c,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme),(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(c),this.embedFonts(c,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(mxUtils.getXml(b))})):d(mxUtils.getXml(b))}));return}k.postMessage(JSON.stringify(b),"*")}),null!=l.xml&&
-0<l.xml.length?(d=!0,this.setFileData(l.xml),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(K)},0):K()):K();return}if("load"==l.action){n=l.toSketch;f=1==l.autosave;this.hideDialog();null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified);null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit);null!=l.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=l.noSaveBtn);null!=l.noExitBtn&&null==urlParams.noExitBtn&&
-(urlParams.noExitBtn=l.noExitBtn);null!=l.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,l.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(Z){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var S=this.getCurrentFile();
-null!=S&&(q=m(l.xml),null!=q&&""!=q&&S.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),
-"*");return}}catch(Z){this.handleError(Z)}}var N=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Y=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,n)}catch(aa){this.handleError(aa)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=N();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=N();if(f!=e&&!d){var g=this.createLoadMessage("autosave");g.xml=f;(window.opener||window.parent).postMessage(JSON.stringify(g),
-"*")}e=f}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",
-c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=g;k.postMessage(JSON.stringify(m),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(m="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+1)),function(b){Y(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=l&&"function"===
-typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&Y(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,mxUtils.bind(this,function(b){Y(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==
-l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=m(l),Y(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){Y(N(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var n=this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){n.apply(this,arguments);
-k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var e=
-"1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,e);c.setAttribute("title",e);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&
-(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",
-d),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
-":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,f=d.getSelectionCells(),e=0;e<b.length;e++){var g=new window[b[e].layout](d);if(null!=b[e].config)for(var l in b[e].config)g[l]=
-b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g=[],l={};if(0<d.length){var k={},n=null,A=null,z=null,y=null,B=null,C=null,D="whiteSpace=wrap;html=1;",G=null,E=null,F="",I="auto",H="auto",J=null,M=null,P=40,T=40,L=100,R=0,K=this.editor.graph;K.getGraphBounds();for(var S=function(){null!=c?c(qa):(K.setSelectionCells(qa),K.scrollCellToVisible(K.getSelectionCell()))},
-N=K.getFreeInsertPoint(),Y=N.x,Z=N.y,N=Z,oa=null,ea="auto",E=null,aa=[],la=null,ba=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var ma=b.indexOf(":");if(0<ma){var O=mxUtils.trim(b.substring(1,ma)),U=mxUtils.trim(b.substring(ma+1));"label"==O?oa=K.sanitizeHtml(U):"labelname"==O&&0<U.length&&"-"!=U?B=U:"labels"==O&&0<U.length&&"-"!=U?
-C=JSON.parse(U):"style"==O?A=U:"parentstyle"==O?D=U:"stylename"==O&&0<U.length&&"-"!=U?y=U:"styles"==O&&0<U.length&&"-"!=U?z=JSON.parse(U):"vars"==O&&0<U.length&&"-"!=U?n=JSON.parse(U):"identity"==O&&0<U.length&&"-"!=U?G=U:"parent"==O&&0<U.length&&"-"!=U?E=U:"namespace"==O&&0<U.length&&"-"!=U?F=U:"width"==O?I=U:"height"==O?H=U:"left"==O&&0<U.length?J=U:"top"==O&&0<U.length?M=U:"ignore"==O?ba=U.split(","):"connect"==O?aa.push(JSON.parse(U)):"link"==O?la=U:"padding"==O?R=parseFloat(U):"edgespacing"==
-O?P=parseFloat(U):"nodespacing"==O?T=parseFloat(U):"levelspacing"==O?L=parseFloat(U):"layout"==O&&(ea=U)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var X=this.editor.csvToArray(d[fa]),O=ma=null,U=[],V=0;V<X.length;V++)G==X[V]&&(ma=V),E==X[V]&&(O=V),U.push(mxUtils.trim(X[V]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==oa&&(oa="%"+U[0]+"%");if(null!=aa)for(var ja=0;ja<aa.length;ja++)null==k[aa[ja].to]&&(k[aa[ja].to]={});G=[];for(V=fa+1;V<d.length;V++){var ga=
-this.editor.csvToArray(d[V]);if(null==ga){var pa=40<d[V].length?d[V].substring(0,40)+"...":d[V];throw Error(pa+" ("+V+"):\n"+mxResources.get("containsValidationErrors"));}0<ga.length&&G.push(ga)}K.model.beginUpdate();try{for(V=0;V<G.length;V++){var ga=G[V],W=null,ca=null!=ma?F+ga[ma]:null;null!=ca&&(W=K.model.getCell(ca));var d=null!=W,ha=new mxCell(oa,new mxGeometry(Y,N,0,0),A||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ca;for(var Q=0;Q<ga.length;Q++)K.setAttributeForCell(ha,U[Q],ga[Q]);if(null!=
-B&&null!=C){var da=C[ha.getAttribute(B)];null!=da&&K.labelChanged(ha,da)}if(null!=y&&null!=z){var ua=z[ha.getAttribute(y)];null!=ua&&(ha.style=ua)}K.setAttributeForCell(ha,"placeholders","1");ha.style=K.replacePlaceholders(ha,ha.style,n);d?(K.model.setValue(W,ha.value),K.model.setStyle(W,ha.style),0>mxUtils.indexOf(g,W)&&g.push(W),K.fireEvent(new mxEventObject("cellsInserted","cells",[W]))):K.fireEvent(new mxEventObject("cellsInserted","cells",[ha]));W=ha;if(!d)for(ja=0;ja<aa.length;ja++)k[aa[ja].to][W.getAttribute(aa[ja].to)]=
-W;null!=la&&"link"!=la&&(K.setLinkForCell(W,W.getAttribute(la)),K.setAttributeForCell(W,la,null));var ka=this.editor.graph.getPreferredSizeForCell(W),E=null!=O?K.model.getCell(F+ga[O]):null;if(W.vertex){pa=null!=E?0:Y;fa=null!=E?0:Z;null!=J&&null!=W.getAttribute(J)&&(W.geometry.x=pa+parseFloat(W.getAttribute(J)));null!=M&&null!=W.getAttribute(M)&&(W.geometry.y=fa+parseFloat(W.getAttribute(M)));var ia="@"==I.charAt(0)?W.getAttribute(I.substring(1)):null;W.geometry.width=null!=ia&&"auto"!=ia?parseFloat(W.getAttribute(I.substring(1))):
-"auto"==I||"auto"==ia?ka.width+R:parseFloat(I);var na="@"==H.charAt(0)?W.getAttribute(H.substring(1)):null;W.geometry.height=null!=na&&"auto"!=na?parseFloat(na):"auto"==H||"auto"==na?ka.height+R:parseFloat(H);N+=W.geometry.height+T}d?(null==l[ca]&&(l[ca]=[]),l[ca].push(W)):(f.push(W),null!=E?(E.style=K.replacePlaceholders(E,D,n),K.addCell(W,E),e.push(E)):g.push(K.addCell(W)))}for(V=0;V<e.length;V++)ia="@"==I.charAt(0)?e[V].getAttribute(I.substring(1)):null,na="@"==H.charAt(0)?e[V].getAttribute(H.substring(1)):
-null,"auto"!=I&&"auto"!=ia||"auto"!=H&&"auto"!=na||K.updateGroupBounds([e[V]],R,!0);for(var ta=g.slice(),qa=g.slice(),ja=0;ja<aa.length;ja++)for(var ra=aa[ja],V=0;V<f.length;V++){var W=f[V],wa=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&(K.setAttributeForCell(c,d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=k[d.to][f[e]];if(null!=g){var l=d.label;null!=d.fromlabel&&(l=(c.getAttribute(d.fromlabel)||"")+(l||""));null!=d.sourcelabel&&(l=K.replacePlaceholders(c,
+!0)}),0))}),!0);var g=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==d?!0:g.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);null==urlParams.rough&&(mxSettings.settings.sketchMode=b,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
+function(b){Editor.pagesVisible!=b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setInlineFullscreen=function(b){Editor.inlineFullscreen!=b&&(Editor.inlineFullscreen=b,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(b){if(Editor.sketchMode!=b){var c=this.editor.graph;Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=b?20:16;c.defaultVertexStyle={pointerEvents:"0",fontSize:this.menus.defaultFontSize};c.defaultEdgeStyle={fontSize:this.menus.defaultFontSize-4,edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",endSize:"14",startSize:"14"};b&&(c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultVertexStyle.hachureGap="4",c.defaultVertexStyle.sketch="1",c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.hachureGap="4",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing=
+"8",this.menus.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(this.menus.defaultFonts));this.initialDefaultVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);
+c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);Graph.prototype.defaultVertexStyle=c.defaultVertexStyle;Graph.prototype.defaultEdgeStyle=c.defaultEdgeStyle;this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(b){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var d=b.indexOf(",");0<d&&(c=this.getPageById(b.substring(d+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(c=mxResources.get("action"));return c};
+EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");if(b=this.getPageById(b.substring(c+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};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(b){b.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(b,
+c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.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(b,c){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(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){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(b,c){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(b,c,d){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();
+var f=this.createImageDataUri(b,c,"png"),e=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(f,e,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=d?d:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(p){this.handleError(p)}};
+EditorUi.prototype.writeImageToClipboard=function(b,c,d,e){var f=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":f,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+d+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var f=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(f));
+mxUtils.setTextContent(b,encodeURIComponent(e));c?(d.removeCells(f,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=
+function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,f.pasteCounter=0);var k=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,k,k),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){k=f.getStartEditingCell(f.getSelectionCell(),e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,b,[k]);else{f.model.beginUpdate();try{f.labelChanged(k,
+b),Graph.isLink(b)&&f.setLinkForCell(k,b)}finally{f.model.endUpdate()}}f.setSelectionCell(k)}else g=f.getInsertPoint(),f.isMouseInsertPoint()&&(k=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=
+c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,l))}k=f.getElementsByTagName("span");if(null!=
+k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{g=
+g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var n=g.lastIndexOf("%3E");0<=n&&n<g.length-3&&(g=g.substring(0,n+3))}catch(y){}try{k=f.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(m)&&(l=!0,g=m)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;p.lastPasteXml=null;p.pasteCounter=
+0}}catch(y){this.handleError(y)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=
+this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[d],"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(b);
+if(null==d){var f=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?d=f.getData("Text"):(d=null,d=0<=mxUtils.indexOf(f.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=d&&0<d.length?(f=document.createElement("div"),f.innerHTML=this.editor.graph.sanitizeHtml(d),f=f.getElementsByTagName("img"),0<f.length&&(d=f[0].getAttribute("src"))):0<=mxUtils.indexOf(f.types,
+"text/plain")&&(d=f.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):
+window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var c=0,d=0,f,e;if(null==b){e=document.body;var g=document.documentElement;f=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else c=b.offsetTop,d=b.offsetLeft,f=b.clientWidth,e=b.clientHeight;g=document.createElement("div");
+g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=d+"px";g.style.width=Math.max(0,f-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var c=this.editor.extractGraphModel(b.documentElement);
+b=[];if(null!=c){var d=new mxCodec(c.ownerDocument),f=new mxGraphModel;d.decode(c,f);c=f.getChildAt(f.getRoot(),0);for(d=0;d<f.getChildCount(c);d++)b.push(f.getChildAt(c,d))}return b};EditorUi.prototype.openFileHandle=function(b,c,d,e,g){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var f=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+
+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,
+mxUtils.bind(this,function(b){this.spinner.stop();f(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(d,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?f(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,
+c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,e)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,b,d.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==
+b.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(b){this.spinner.stop();f(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,e)}));else{if("image/png"==d.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==d.type){var k=Editor.extractGraphModelFromPdf(b);null!=k&&(g=null,e=!0,b=k)}this.spinner.stop();this.openLocalFile(b,c,e,g,null!=g?d:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=
+0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,d,e,g){var f=this.getCurrentFile(),
+k=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var f=mxUtils.parseXml(b);null!=f&&(this.editor.setGraphXml(f.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,d,e,g))});if(null!=b&&0<b.length)null==f||!f.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)?k():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=e)&&null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges")):k()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=
+0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],d;for(d in b)c.push(d);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var f=this.editor.graph,e=f.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));f.model.isEdge(b)&&
+(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=f.model.getChildCount(b),g=0;g<e;g++)this.addBasenamesForCell(f.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=
+b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(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 b=!1;this.installMessageHandler(mxUtils.bind(this,function(c,d,f,e){b||(b=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
+if(null==c||0==c.length)c=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,c,{}));this.mode=App.MODE_EMBED;this.setFileData(c);if(e)try{var g=this.editor.graph;g.setGridEnabled(!1);g.pageVisible=!1;var k=g.model.cells,l;for(l in k){var m=k[l];null!=m&&null!=m.style&&(m.style+=";sketch=1;"+(-1==m.style.indexOf("fontFamily=")||-1<m.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=f?f:!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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var c=this.editor.graph;return{event:b,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(){this.getEmbeddedSvg(this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1),this.editor.graph,null,!0,mxUtils.bind(this,function(b){this.editor.modified=!1;(window.opener||window.parent).postMessage(JSON.stringify({event:"export",data:Editor.createSvgDataUri(b)}),"*")}),null,null,!0,null,1,8);this.diagramContainer.removeAttribute("data-bounds");Editor.inlineFullscreen=!1;this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);this.editor.modified=!1;this.fireEvent(new mxEventObject("editInlineStop"))};
+EditorUi.prototype.installMessageHandler=function(b){var c=null,d=!1,f=!1,e=null,g=mxUtils.bind(this,function(b,c){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,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,m=null,n=mxUtils.bind(this,
+function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ca){}return b});if("json"==urlParams.proto){var p=!1;try{l=JSON.parse(l)}catch(aa){l=null}try{if(null==l)return;
+if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("layout"==l.action){this.executeLayoutList(l.layouts);return}if("prompt"==l.action){this.spinner.stop();var q=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):l.ok,function(b){null!=b?k.postMessage(JSON.stringify({event:"prompt",
+value:b,message:l}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(q.container,300,80,!0,!1);q.init();return}if("draft"==l.action){var t=n(l.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),t,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();
+k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(aa){k.postMessage(JSON.stringify({event:"draft",error:aa.toString(),
+message:l}),"*")}return}if("template"==l.action){this.spinner.stop();var u=1==l.enableRecent,v=1==l.enableSearch,F=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var x=this.getCurrentUser(),L=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,
+function(){this.actions.get("exit").funct()}),null,null,null!=x?x.id:null,u?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,v?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,F?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(L.container,
+window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,function(c,d,f,e){c=c||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:d,tempUrl:f,libs:e,builtIn:!0,message:l}),"*"):(b(c,g,c!=this.emptyDiagramXml,l.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",
+[null],null,b,function(){b(null,"Network Error!")})}):null,v?mxUtils.bind(this,function(b,c){this.remoteInvoke("searchDiagrams",[b,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,c,d){k.postMessage(JSON.stringify({event:"template",docUrl:b,info:c,name:d}),"*")}),null,null,F?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,
+function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==l.action){var H=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:H,message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var M=
+null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var T=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,J=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();
+var c=this.createLoadMessage("export");c.format=l.format;c.message=l;c.data=b;c.xml=T;k.postMessage(JSON.stringify(c),"*")}),U=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(T)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);J(b)}),K=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var N=mxUtils.bind(this,
+function(){if(null!=this.pages&&this.currentPage.getId()!=K){var b=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());for(var c,d=0;d<this.pages.length;d++)if(this.pages[d].getId()==K){c=this.updatePageRoot(this.pages[d]);break}null==c&&(c=this.currentPage);P.getGlobalVariable=function(d){return"page"==d?c.getName():"pagenumber"==d?1:b.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(c.root)}if(null!=l.layerIds){for(var f=P.model,e=f.getChildCells(f.getRoot()),
+g={},d=0;d<l.layerIds.length;d++)g[l.layerIds[d]]=!0;for(d=0;d<e.length;d++)f.setVisible(e[d],g[e[d].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){U(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){U(null)}),null,null,l.scale,l.transparent,l.shadow,null,P,l.border,null,l.grid,l.keepTheme)});null!=l.xml&&0<l.xml.length?(d=!0,this.setFileData(T),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(N)},0):N()):
+N()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+(null!=K?"&pageId="+K:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?J("data:image/png;base64,"+b.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else N=mxUtils.bind(this,function(){var b=
+this.createLoadMessage("export");b.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var c=this.getXmlFileData();b.xml=mxUtils.getXml(c);b.data=this.getFileData(null,null,!0,null,null,null,c);b.format=l.format}else if("html"==l.format)c=this.editor.getGraphXml(),b.data=this.getHtml(c,this.editor.graph),b.xml=mxUtils.getXml(c),b.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;c=null!=l.background?l.background:this.editor.graph.background;
+c==mxConstants.NONE&&(c=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var d=mxUtils.bind(this,function(c){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(c);k.postMessage(JSON.stringify(b),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(b.xml,this.editor.graph,null,!0,d,null,null,l.embedImages,c,l.scale,
+l.border,l.shadow,l.keepTheme);else if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),c=this.editor.graph.getSvg(c,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme),(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(c),this.embedFonts(c,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,
+mxUtils.bind(this,function(b){d(mxUtils.getXml(b))})):d(mxUtils.getXml(b))}));return}k.postMessage(JSON.stringify(b),"*")}),null!=l.xml&&0<l.xml.length?(d=!0,this.setFileData(l.xml),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(N)},0):N()):N();return}if("load"==l.action){p=l.toSketch;f=1==l.autosave;this.hideDialog();null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified);null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=
+l.saveAndExit);null!=l.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=l.noSaveBtn);if(null!=l.rough){var O=Editor.sketchMode;this.doSetSketchMode(l.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=l.dark&&(O=Editor.darkMode,this.doSetDarkMode(l.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=l.rect&&(this.diagramContainer.style.border="2px solid #295fcc",this.diagramContainer.style.top=l.rect.top+"px",this.diagramContainer.style.left=
+l.rect.left+"px",this.diagramContainer.style.height=l.rect.height+"px",this.diagramContainer.style.width=l.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",m=mxUtils.bind(this,function(){var b=this.editor.graph,c=b.maxFitScale;b.maxFitScale=1;b.fit(20);b.maxFitScale=c;b.container.scrollTop-=20;b.container.scrollLeft-=20;this.fireEvent(new mxEventObject("editInlineStart","data",[l]))}));null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=l.noExitBtn);
+null!=l.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,l.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(aa){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var X=this.getCurrentFile();null!=X&&(t=n(l.xml),null!=t&&""!=
+t&&X.mergeFile(new LocalFile(this,t),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(aa){this.handleError(aa)}}var Z=
+mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ka=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,p)}catch(qa){this.handleError(qa)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=Z();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=Z();if(f!=e&&!d){var g=this.createLoadMessage("autosave");g.xml=f;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}e=f}),
+this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",
+c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=g;k.postMessage(JSON.stringify(n),"*")}null!=m&&m()});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(n="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+1)),function(b){ka(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),n)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&ka(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,mxUtils.bind(this,function(b){ka(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||
+null==l.data&&null==l.url?(l=n(l),ka(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){ka(Z(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var n=this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",
+href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var e="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,e);c.setAttribute("title",e);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),
+mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geBigButton geBigStandardButton",
+c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,
+function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,f=d.getSelectionCells(),e=0;e<b.length;e++){var g=new window[b[e].layout](d);if(null!=b[e].config)for(var l in b[e].config)g[l]=b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),
+0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g=[],l={};if(0<d.length){var k={},n=null,A=null,z=null,y=null,B=null,C=null,E="whiteSpace=wrap;html=1;",D=null,G=null,F="",I="auto",L="auto",H=null,M=null,T=40,P=40,J=100,U=0,K=this.editor.graph;K.getGraphBounds();for(var N=function(){null!=c?c(na):(K.setSelectionCells(na),K.scrollCellToVisible(K.getSelectionCell()))},O=K.getFreeInsertPoint(),X=O.x,Z=O.y,O=Z,ka=null,aa="auto",G=null,
+ca=[],la=null,qa=null,Y=0;Y<d.length&&"#"==d[Y].charAt(0);){b=d[Y];for(Y++;Y<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[Y].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[Y].substring(1)),Y++;if("#"!=b.charAt(1)){var oa=b.indexOf(":");if(0<oa){var R=mxUtils.trim(b.substring(1,oa)),V=mxUtils.trim(b.substring(oa+1));"label"==R?ka=K.sanitizeHtml(V):"labelname"==R&&0<V.length&&"-"!=V?B=V:"labels"==R&&0<V.length&&"-"!=V?C=JSON.parse(V):"style"==R?A=V:"parentstyle"==R?E=V:"stylename"==R&&0<V.length&&
+"-"!=V?y=V:"styles"==R&&0<V.length&&"-"!=V?z=JSON.parse(V):"vars"==R&&0<V.length&&"-"!=V?n=JSON.parse(V):"identity"==R&&0<V.length&&"-"!=V?D=V:"parent"==R&&0<V.length&&"-"!=V?G=V:"namespace"==R&&0<V.length&&"-"!=V?F=V:"width"==R?I=V:"height"==R?L=V:"left"==R&&0<V.length?H=V:"top"==R&&0<V.length?M=V:"ignore"==R?qa=V.split(","):"connect"==R?ca.push(JSON.parse(V)):"link"==R?la=V:"padding"==R?U=parseFloat(V):"edgespacing"==R?T=parseFloat(V):"nodespacing"==R?P=parseFloat(V):"levelspacing"==R?J=parseFloat(V):
+"layout"==R&&(aa=V)}}}if(null==d[Y])throw Error(mxResources.get("invalidOrMissingFile"));for(var fa=this.editor.csvToArray(d[Y]),R=oa=null,V=[],Q=0;Q<fa.length;Q++)D==fa[Q]&&(oa=Q),G==fa[Q]&&(R=Q),V.push(mxUtils.trim(fa[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ka&&(ka="%"+V[0]+"%");if(null!=ca)for(var ja=0;ja<ca.length;ja++)null==k[ca[ja].to]&&(k[ca[ja].to]={});D=[];for(Q=Y+1;Q<d.length;Q++){var ea=this.editor.csvToArray(d[Q]);if(null==ea){var ra=40<d[Q].length?
+d[Q].substring(0,40)+"...":d[Q];throw Error(ra+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<ea.length&&D.push(ea)}K.model.beginUpdate();try{for(Q=0;Q<D.length;Q++){var ea=D[Q],W=null,ba=null!=oa?F+ea[oa]:null;null!=ba&&(W=K.model.getCell(ba));var d=null!=W,da=new mxCell(ka,new mxGeometry(X,O,0,0),A||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=ba;for(var ia=0;ia<ea.length;ia++)K.setAttributeForCell(da,V[ia],ea[ia]);if(null!=B&&null!=C){var S=C[da.getAttribute(B)];null!=S&&K.labelChanged(da,
+S)}if(null!=y&&null!=z){var ga=z[da.getAttribute(y)];null!=ga&&(da.style=ga)}K.setAttributeForCell(da,"placeholders","1");da.style=K.replacePlaceholders(da,da.style,n);d?(K.model.setValue(W,da.value),K.model.setStyle(W,da.style),0>mxUtils.indexOf(g,W)&&g.push(W),K.fireEvent(new mxEventObject("cellsInserted","cells",[W]))):K.fireEvent(new mxEventObject("cellsInserted","cells",[da]));W=da;if(!d)for(ja=0;ja<ca.length;ja++)k[ca[ja].to][W.getAttribute(ca[ja].to)]=W;null!=la&&"link"!=la&&(K.setLinkForCell(W,
+W.getAttribute(la)),K.setAttributeForCell(W,la,null));var ma=this.editor.graph.getPreferredSizeForCell(W),G=null!=R?K.model.getCell(F+ea[R]):null;if(W.vertex){ra=null!=G?0:X;Y=null!=G?0:Z;null!=H&&null!=W.getAttribute(H)&&(W.geometry.x=ra+parseFloat(W.getAttribute(H)));null!=M&&null!=W.getAttribute(M)&&(W.geometry.y=Y+parseFloat(W.getAttribute(M)));var pa="@"==I.charAt(0)?W.getAttribute(I.substring(1)):null;W.geometry.width=null!=pa&&"auto"!=pa?parseFloat(W.getAttribute(I.substring(1))):"auto"==I||
+"auto"==pa?ma.width+U:parseFloat(I);var ha="@"==L.charAt(0)?W.getAttribute(L.substring(1)):null;W.geometry.height=null!=ha&&"auto"!=ha?parseFloat(ha):"auto"==L||"auto"==ha?ma.height+U:parseFloat(L);O+=W.geometry.height+P}d?(null==l[ba]&&(l[ba]=[]),l[ba].push(W)):(f.push(W),null!=G?(G.style=K.replacePlaceholders(G,E,n),K.addCell(W,G),e.push(G)):g.push(K.addCell(W)))}for(Q=0;Q<e.length;Q++)pa="@"==I.charAt(0)?e[Q].getAttribute(I.substring(1)):null,ha="@"==L.charAt(0)?e[Q].getAttribute(L.substring(1)):
+null,"auto"!=I&&"auto"!=pa||"auto"!=L&&"auto"!=ha||K.updateGroupBounds([e[Q]],U,!0);for(var sa=g.slice(),na=g.slice(),ja=0;ja<ca.length;ja++)for(var ta=ca[ja],Q=0;Q<f.length;Q++){var W=f[Q],va=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&(K.setAttributeForCell(c,d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=k[d.to][f[e]];if(null!=g){var l=d.label;null!=d.fromlabel&&(l=(c.getAttribute(d.fromlabel)||"")+(l||""));null!=d.sourcelabel&&(l=K.replacePlaceholders(c,
d.sourcelabel,n)+(l||""));null!=d.tolabel&&(l=(l||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(l=(l||"")+K.replacePlaceholders(g,d.targetlabel,n));var m="target"==d.placeholders==!d.invert?g:b,m=null!=d.style?K.replacePlaceholders(m,d.style,n):K.createCurrentEdgeStyle(),l=K.insertEdge(null,null,l||"",d.invert?g:b,d.invert?b:g,m);if(null!=d.labels)for(m=0;m<d.labels.length;m++){var p=d.labels[m],y=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");
-y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=K.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,n));if(null!=p.dx||null!=p.dy)y.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);l.insert(y)}qa.push(l);mxUtils.remove(d.invert?b:g,ta)}}});wa(W,W,ra);if(null!=l[W.id])for(Q=0;Q<l[W.id].length;Q++)wa(W,l[W.id][Q],ra)}if(null!=ba)for(V=0;V<f.length;V++)for(W=f[V],Q=0;Q<ba.length;Q++)K.setAttributeForCell(W,mxUtils.trim(ba[Q]),null);
-if(0<g.length){var va=new mxParallelEdgeLayout(K);va.spacing=P;va.checkOverlap=!0;var Aa=function(){0<va.spacing&&va.execute(K.getDefaultParent());for(var b=0;b<g.length;b++){var c=K.getCellGeometry(g[b]);c.x=Math.round(K.snap(c.x));c.y=Math.round(K.snap(c.y));"auto"==I&&(c.width=Math.round(K.snap(c.width)));"auto"==H&&(c.height=Math.round(K.snap(c.height)))}};if("["==ea.charAt(0)){var Ba=S;K.view.validate();this.executeLayoutList(JSON.parse(ea),function(){Aa();Ba()});S=null}else if("circle"==ea){var sa=
-new mxCircleLayout(K);sa.disableEdgeStyle=!1;sa.resetEdges=!1;var ya=sa.isVertexIgnored;sa.isVertexIgnored=function(b){return ya.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){sa.execute(K.getDefaultParent());Aa()},!0,S);S=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&qa.length==2*g.length-1&&1==ta.length){K.view.validate();var Ca=new mxCompactTreeLayout(K,"horizontaltree"==ea);Ca.levelDistance=T;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(K.getDefaultParent(),
-0<ta.length?ta[0]:null)},!0,S);S=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==ta.length){K.view.validate();var xa=new mxHierarchicalLayout(K,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=T;xa.parallelEdgeSpacing=P;xa.interRankCellSpacing=L;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(K.getDefaultParent(),qa);K.moveCells(qa,Y,Z)},!0,S);S=null}else if("organic"==ea||"auto"==ea&&qa.length>g.length){K.view.validate();
-var za=new mxFastOrganicLayout(K);za.forceConstant=3*T;za.disableEdgeStyle=!1;za.resetEdges=!1;var Da=za.isVertexIgnored;za.isVertexIgnored=function(b){return Da.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){za.execute(K.getDefaultParent());Aa()},!0,S);S=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=S&&S()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=function(b){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var d=
+y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=K.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,n));if(null!=p.dx||null!=p.dy)y.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);l.insert(y)}na.push(l);mxUtils.remove(d.invert?b:g,sa)}}});va(W,W,ta);if(null!=l[W.id])for(ia=0;ia<l[W.id].length;ia++)va(W,l[W.id][ia],ta)}if(null!=qa)for(Q=0;Q<f.length;Q++)for(W=f[Q],ia=0;ia<qa.length;ia++)K.setAttributeForCell(W,mxUtils.trim(qa[ia]),
+null);if(0<g.length){var wa=new mxParallelEdgeLayout(K);wa.spacing=T;wa.checkOverlap=!0;var Aa=function(){0<wa.spacing&&wa.execute(K.getDefaultParent());for(var b=0;b<g.length;b++){var c=K.getCellGeometry(g[b]);c.x=Math.round(K.snap(c.x));c.y=Math.round(K.snap(c.y));"auto"==I&&(c.width=Math.round(K.snap(c.width)));"auto"==L&&(c.height=Math.round(K.snap(c.height)))}};if("["==aa.charAt(0)){var Ba=N;K.view.validate();this.executeLayoutList(JSON.parse(aa),function(){Aa();Ba()});N=null}else if("circle"==
+aa){var ua=new mxCircleLayout(K);ua.disableEdgeStyle=!1;ua.resetEdges=!1;var ya=ua.isVertexIgnored;ua.isVertexIgnored=function(b){return ya.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){ua.execute(K.getDefaultParent());Aa()},!0,N);N=null}else if("horizontaltree"==aa||"verticaltree"==aa||"auto"==aa&&na.length==2*g.length-1&&1==sa.length){K.view.validate();var Ca=new mxCompactTreeLayout(K,"horizontaltree"==aa);Ca.levelDistance=P;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(K.getDefaultParent(),
+0<sa.length?sa[0]:null)},!0,N);N=null}else if("horizontalflow"==aa||"verticalflow"==aa||"auto"==aa&&1==sa.length){K.view.validate();var xa=new mxHierarchicalLayout(K,"horizontalflow"==aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=P;xa.parallelEdgeSpacing=T;xa.interRankCellSpacing=J;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(K.getDefaultParent(),na);K.moveCells(na,X,Z)},!0,N);N=null}else if("organic"==aa||"auto"==aa&&na.length>g.length){K.view.validate();
+var za=new mxFastOrganicLayout(K);za.forceConstant=3*P;za.disableEdgeStyle=!1;za.resetEdges=!1;var Da=za.isVertexIgnored;za.isVertexIgnored=function(b){return Da.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){za.execute(K.getDefaultParent());Aa()},!0,N);N=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=N&&N()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=function(b){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var d=
"?",f;for(f in urlParams)0>mxUtils.indexOf(b,f)&&null!=urlParams[f]&&(c+=d+f+"="+urlParams[f],d="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var c=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),f;for(f in urlParams)0>mxUtils.indexOf(d,f)&&(b=0==c?b+"?":b+"&",null!=urlParams[f]&&(b+=f+"="+
urlParams[f],c++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,d,e,g){b=new LinkDialog(this,b,c,d,!0,e,g);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;null!=this.notion&&c++;b&&isLocalStorage&&
"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);
@@ -10934,31 +10939,31 @@ f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};Ed
null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,d){var e=this.getCurrentFile();null!=e?e.addComment(b,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,
b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,d,e,g,k,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,d,e,g,k,n,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,n,v,x,A,z,y,B,C,D,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,
-x,A,z,y,B,C,D,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,d,e)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};
+return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,n,v,x,A,z,y,B,C,E,D){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,
+x,A,z,y,B,C,E,D)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,d,e)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};
EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,d,e)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,d,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,
c,d,e,g)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var g="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(g||e)&&b.push(d)}}return b};EditorUi.prototype.getLocalStorageFile=
function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,e,d,c,k,g){function n(){for(var b=y.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==y&&c++;B.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}x={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),n()):f();x=null});p.className="geCommentEditBtn";m.appendChild(p);var y=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);x=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(y.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));y.focus();y.className="geCommentEditBtn gePrimaryBtn";m.appendChild(y);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function l(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function m(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function C(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});J.appendChild(f);e&&(f.style.display="none")}function F(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=D;b(c);return{pdiv:e,replies:d}}function M(d,e,k,l,n){function y(){m(C);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(C);k&&k()},function(c){B();p(C);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function B(){f(v,C,function(b){y()},!0)}var u=F().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=t(v,c.replies,u,g+1);e?B():y()}if(k||!c.isResolved){B.style.display="none";var D=document.createElement("div");D.className="geCommentContainer";D.setAttribute("data-commentId",c.id);D.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(D.style.backgroundColor="ghostWhite");
-var z=document.createElement("div");z.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=c.user.pictureUrl||Editor.userImage;z.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";z.appendChild(A);var E=document.createElement("div");E.className="geCommentUsername";mxUtils.write(E,c.user.displayName||"");A.appendChild(E);E=document.createElement("div");E.className="geCommentDate";E.setAttribute("data-commentId",c.id);l(c,
-E);A.appendChild(E);D.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,c.content||"");D.appendChild(z);c.isLocked&&(D.style.opacity="0.5");z=document.createElement("div");z.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";z.appendChild(J);u||c.isLocked||0!=g&&!v||C(mxResources.get("reply"),function(){M("",!0)},c.isResolved);A=b.getCurrentUser();null==A||A.id!=c.user.id||u||c.isLocked||(C(mxResources.get("edit"),
-function(){function d(){f(c,D,function(){m(D);c.editComment(c.content,function(){q(D)},function(c){p(D);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),C(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){m(D);c.deleteComment(function(b){if(!0===b){b=D.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=D.querySelectorAll(".geCommentAction");for(b=
-0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(D);D.style.opacity="0.5"}else{e=F(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(D);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||C(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=F(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);G||(f[k].style.display="none")}n()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});D.appendChild(z);null!=e?y.insertBefore(D,e.nextSibling):y.appendChild(D);for(e=0;null!=c.replies&&e<c.replies.length;e++)z=c.replies[e],z.isResolved=c.isResolved,t(z,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,D,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return D}}
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function m(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function F(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});H.appendChild(f);e&&(f.style.display="none")}function C(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=E;b(c);return{pdiv:e,replies:d}}function M(d,e,k,l,n){function y(){m(F);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(F);k&&k()},function(c){B();p(F);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function B(){f(v,F,function(b){y()},!0)}var u=C().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var F=t(v,c.replies,u,g+1);e?B():y()}if(k||!c.isResolved){B.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",c.id);E.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(E.style.backgroundColor="ghostWhite");
+var z=document.createElement("div");z.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=c.user.pictureUrl||Editor.userImage;z.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";z.appendChild(A);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,c.user.displayName||"");A.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",c.id);l(c,
+G);A.appendChild(G);E.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,c.content||"");E.appendChild(z);c.isLocked&&(E.style.opacity="0.5");z=document.createElement("div");z.className="geCommentActions";var H=document.createElement("ul");H.className="geCommentActionsList";z.appendChild(H);u||c.isLocked||0!=g&&!v||F(mxResources.get("reply"),function(){M("",!0)},c.isResolved);A=b.getCurrentUser();null==A||A.id!=c.user.id||u||c.isLocked||(F(mxResources.get("edit"),
+function(){function d(){f(c,E,function(){m(E);c.editComment(c.content,function(){q(E)},function(c){p(E);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),F(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){m(E);c.deleteComment(function(b){if(!0===b){b=E.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=E.querySelectorAll(".geCommentAction");for(b=
+0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(E);E.style.opacity="0.5"}else{e=C(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(E);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||F(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=C(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);D||(f[k].style.display="none")}n()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});E.appendChild(z);null!=e?y.insertBefore(E,e.nextSibling):y.appendChild(E);for(e=0;null!=c.replies&&e<c.replies.length;e++)z=c.replies[e],z.isResolved=c.isResolved,t(z,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,E,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return E}}
var u=!b.canComment(),v=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(z)+7+"px";A.appendChild(y);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(B,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=z;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!u){var D=z.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(D,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;E.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,E,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(D)}D=z.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
-var G=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";F();b.preventDefault();mxEvent.consume(b)});C.appendChild(D);b.commentsRefreshNeeded()&&(D=z.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){F();
-b.preventDefault();mxEvent.consume(b)}),C.appendChild(D));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(b){g();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var E=[],F=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
+mxUtils.write(B,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=z;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!u){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(E,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;G.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,G,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
+var D=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(b){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";F();b.preventDefault();mxEvent.consume(b)});C.appendChild(E);b.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){F();
+b.preventDefault();mxEvent.consume(b)}),C.appendChild(E));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(b){g();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var G=[],F=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
var c=x.div.querySelector(".geCommentEditTxtArea"),d=x.div.querySelector(".geCommentEditBtns");x.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(M){b.handleError(M)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(B);B.style.display="block";E=b;for(b=0;b<E.length;b++)c(E[b].replies),t(E[b],E,null,0,G);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});F();this.refreshComments=F;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<E.length;e++)b(E[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(B);B.style.display="block";G=b;for(b=0;b<G.length;b++)c(G[b].replies),t(G[b],G,null,0,D);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});F();this.refreshComments=F;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<G.length;e++)b(G[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
new mxWindow(mxResources.get("comments"),A,e,d,c,k,!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(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=function(b,e,d,
c,k,g,n,f,l,m,p){var q=document.createElement("div");q.style.textAlign="center";p=null!=p?p:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=p+"px";t.style.lineHeight="1.2em";mxUtils.write(t,e);q.appendChild(t);null!=m&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),t.appendChild(e),q.appendChild(t));m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace=
@@ -11135,19 +11140,19 @@ f=!0:b=m}catch(z){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModel
b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=e)e(y);else throw y;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(z){if(null!=e)e(z);else throw z;}}),mxUtils.bind(this,function(b,c){if(m<this.maxRetries&&null!=c&&403==c.getStatus())m++,window.setTimeout(p,2*m*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
6)&&"image/svg"!=d.mimeType.substring(0,9)||/\.png$/i.test(d.title)||/\.jpe?g$/i.test(d.title)||/\.pdf$/i.test(d.title),null,null,null,f)});p()}}catch(q){if(null!=e)e(q);else throw q;}};DriveClient.prototype.saveFile=function(b,c,e,g,n,f,l,m,p){try{var d=0;b.saveLevel=1;var k=mxUtils.bind(this,function(c){if(null!=g)g(c);else throw c;try{if(!b.isConflict(c)){var d="sl_"+b.saveLevel+"-error_"+(b.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(I){}}),u=mxUtils.bind(this,function(b){k(b);try{EditorUi.logError(b.message,null,null,
-b)}catch(F){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,D={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==D.mimeType||"1"==urlParams["override-mime"]&&D.mimeType!=this.xmlMimeType)D.mimeType=this.xmlMimeType;
-var G=mxUtils.bind(this,function(g,n,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==m&&(m=[]),null==b.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=g||f||(g=this.placeholderThumbnail,n=this.placeholderMimeType),null!=g&&null!=n&&(D.thumbnail={image:g,mimeType:n}));var t=b.getData(),F=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
+b)}catch(F){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,E={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
+var D=mxUtils.bind(this,function(g,n,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==m&&(m=[]),null==b.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=g||f||(g=this.placeholderThumbnail,n=this.placeholderMimeType),null!=g&&null!=n&&(E.thumbnail={image:g,mimeType:n}));var t=b.getData(),F=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
v,b.saveLevel=11,null==d)k({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=f||x==d.etag||c&&z==d.headRevisionId){b.saveLevel=12;var g=[];0>=f&&g.push("invalid modified time");x==d.etag&&g.push("stale etag");c&&z==d.headRevisionId&&g.push("stale revision");var l=g.join(", ");k({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
-null,"from-"+z+"."+A+"-"+this.ui.hashValue(x)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(S){}}else if(b.saveLevel=null,e(d,t),null!=B){this.executeRequest({url:"/files/"+B.id+"/revisions/"+B.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+B.id+"/revisions/"+
-B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(S){}}}}catch(S){u(S)}}),M=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(D.properties=m);var n=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:b.getCurrentEtag(),p=mxUtils.bind(this,function(g){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,m=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){m=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(aa){}this.executeRequest(this.createUploadRequest(b.getId(),D,e,c||g||l,f,g?null:n,C),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&F(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
+null,"from-"+z+"."+A+"-"+this.ui.hashValue(x)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(N){}}else if(b.saveLevel=null,e(d,t),null!=B){this.executeRequest({url:"/files/"+B.id+"/revisions/"+B.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+B.id+"/revisions/"+
+B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(N){}}}}catch(N){u(N)}}),D=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(E.properties=m);var n=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:b.getCurrentEtag(),p=mxUtils.bind(this,function(g){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,m=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){m=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(ca){}this.executeRequest(this.createUploadRequest(b.getId(),E,e,c||g||l,f,g?null:n,C),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&F(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
if(m){b.saveLevel=6;try{b.isConflict(c)?this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){b.saveLevel=7;try{if(null!=e&&e.etag==n)if(d<this.staleEtagMaxRetries){d++;var f=2*d*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+b.getHash(),action:"rev_"+
-b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(fa){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,
-"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),k(c,e)}catch(fa){u(fa)}}),mxUtils.bind(this,function(){k(c)})):k(c)}catch(la){u(la)}}}))}catch(aa){u(aa)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==n)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(ea){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
-if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&n!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),n=f.etag,p(c)):k({error:{code:412}},f)}catch(aa){u(aa)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,k(c))}))}});if(y&&null==g){b.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/t.width,c=document.createElement("canvas");
-c.width=this.thumbnailWidth;c.height=Math.floor(t.height*b);c.getContext("2d").drawImage(t,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(ea){try{q(!1)}catch(aa){u(aa)}}});t.src="data:image/png;base64,"+e}else q(!1)}catch(Y){u(Y)}});if(y){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){M(b,!0)}),k,this.ui.getCurrentFile()!=
-b?t:null,G.scale,G.border)}else M(t,!1)}catch(T){u(T)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=D.mimeType&&"application/vnd.jgraph.mxfile"!=D.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(I){c=null}G(c,
-"image/png")}catch(I){u(I)}})))&&G(null,null,b.constructor!=DriveLibrary)}catch(E){u(E)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(E){u(E)}};DriveClient.prototype.insertFile=function(b,c,e,g,n,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?g(new DriveLibrary(this.ui,c,b)):0==b?null!=n&&
+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,"remote",
+e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),k(c,e)}catch(Y){u(Y)}}),mxUtils.bind(this,function(){k(c)})):k(c)}catch(la){u(la)}}}))}catch(ca){u(ca)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==n)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(aa){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
+if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&n!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),n=f.etag,p(c)):k({error:{code:412}},f)}catch(ca){u(ca)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,k(c))}))}});if(y&&null==g){b.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/t.width,c=document.createElement("canvas");
+c.width=this.thumbnailWidth;c.height=Math.floor(t.height*b);c.getContext("2d").drawImage(t,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(aa){try{q(!1)}catch(ca){u(ca)}}});t.src="data:image/png;base64,"+e}else q(!1)}catch(X){u(X)}});if(y){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){D(b,!0)}),k,this.ui.getCurrentFile()!=
+b?t:null,G.scale,G.border)}else D(t,!1)}catch(P){u(P)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(I){c=null}D(c,
+"image/png")}catch(I){u(I)}})))&&D(null,null,b.constructor!=DriveLibrary)}catch(G){u(G)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(G){u(G)}};DriveClient.prototype.insertFile=function(b,c,e,g,n,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?g(new DriveLibrary(this.ui,c,b)):0==b?null!=n&&
n({message:mxResources.get("errorSavingFile")}):g(new DriveFile(this.ui,c,b))}),n)};DriveClient.prototype.createUploadRequest=function(b,c,e,g,n,f,l){n=null!=n?n:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);b={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=b?"/"+b:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=b?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=e?n?e:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(e):Graph.base64EncodeUnicode(e):"")+"\r\n---------314159265358979323846--"};g||(b.fullUrl+="&newRevision=false");l&&(b.fullUrl+="&pinned=true");return b};DriveClient.prototype.createLinkPicker=function(){var d=e.linkPicker;if(null==d||e.linkPickerToken!=b){e.linkPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(c).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED)}return d};DriveClient.prototype.pickFile=function(d,c,k){this.filePickerCallback=
@@ -11365,25 +11370,25 @@ var m=n.results,y=0;if(null==m||0==m.length)mxUtils.write(f,mxResources.get("noD
f.appendChild(m)})(m[q],q,B),y++}n.has_more?(g=n.next_cursor,0==y?k():(f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==y&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});A()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,k,g,n){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=k;this.isResolved=g;this.user=n;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,k){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,k,g,n,f){DrawioComment.call(this,b,e,d,c,k,g,n);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,k){b={content:b.content};c?b.verb="resolve":k&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
DriveComment.prototype.editComment=function(b,e,d){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,d)};
DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,d,c,k,g,n,f,l,m,p,q,t){function u(b,c){c=c||document;return c.querySelector(b)}function v(b,d,e){if(null==b["@microsoft.graph.downloadUrl"])if(null==b.parentReference)e();else{c(b.id,b.parentReference.driveId,function(b){v(b,d,e)},e);return}var f=new XMLHttpRequest;f.open("GET",b["@microsoft.graph.downloadUrl"]);var g=b.file?"image/png"==b.file.mimeType:!1;f.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var b=f.responseText;
-g&&(b="data:image/png;base64,"+Editor.base64Encode(b),b=Editor.extractGraphModelFromPng(b));var c=mxUtils.parseXml(b),k=Editor.extractGraphModel(c.documentElement);if(null!=k){d(k.ownerDocument);return}}catch(U){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=H?I.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");n(J,b);g(J)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,H):
-(n(J,void 0),g(J))}function A(b){function c(b){var c=document.createElement("div");c.className="odPreviewStatus";mxUtils.write(c,b);N.appendChild(c);F.stop()}if(null!=N)if(N.style.background="transparent",N.innerHTML="",null==b||b.folder)c(mxResources.get("noPreview"));else{F.spin(N);try{null!=b.remoteItem&&(b=b.remoteItem),R=b,v(b,function(c){if(R==b){var d=c.getElementsByTagName("diagram");H=AspectDialog.prototype.createViewer(N,0==d.length?c.documentElement:d[0],null,"transparent");F.stop()}},
-function(){J=null;c(mxResources.get("notADiagramFile"))})}catch(aa){J=null,c(mxResources.get("notADiagramFile"))}}}function z(){var b=u(".odFilesBreadcrumb");if(null!=b){b.innerHTML="";for(var c=0;c<T.length-1;c++){var d=document.createElement("span");d.className="odBCFolder";d.innerHTML=mxUtils.htmlEntities(T[c].name||mxResources.get("home"));b.appendChild(d);(function(b,c){d.addEventListener("click",function(){e(null);T=T.slice(0,c);B(b.driveId,b.folderId,b.siteId,b.name)})})(T[c],c);var f=document.createElement("span");
-f.innerHTML=" &gt; ";b.appendChild(f)}null!=T[T.length-1]&&(c=document.createElement("span"),c.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get("officeSelDiag"):T[T.length-1].name||mxResources.get("home")),b.appendChild(c))}}function y(){if(null!=J&&!P)if("sharepoint"==M)B("site",null,J.id,J.displayName);else if("site"==M)B("subsite",null,J.id,J.name);else{var b=J.folder;J=J.remoteItem?J.remoteItem:J;var c=(J.parentReference?J.parentReference.driveId:null)||M,d=J.id;b?B(c,d,null,J.name):
+g&&(b="data:image/png;base64,"+Editor.base64Encode(b),b=Editor.extractGraphModelFromPng(b));var c=mxUtils.parseXml(b),k=Editor.extractGraphModel(c.documentElement);if(null!=k){d(k.ownerDocument);return}}catch(V){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=L?I.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");n(H,b);g(H)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,L):
+(n(H,void 0),g(H))}function A(b){function c(b){var c=document.createElement("div");c.className="odPreviewStatus";mxUtils.write(c,b);O.appendChild(c);F.stop()}if(null!=O)if(O.style.background="transparent",O.innerHTML="",null==b||b.folder)c(mxResources.get("noPreview"));else{F.spin(O);try{null!=b.remoteItem&&(b=b.remoteItem),U=b,v(b,function(c){if(U==b){var d=c.getElementsByTagName("diagram");L=AspectDialog.prototype.createViewer(O,0==d.length?c.documentElement:d[0],null,"transparent");F.stop()}},
+function(){H=null;c(mxResources.get("notADiagramFile"))})}catch(ca){H=null,c(mxResources.get("notADiagramFile"))}}}function z(){var b=u(".odFilesBreadcrumb");if(null!=b){b.innerHTML="";for(var c=0;c<P.length-1;c++){var d=document.createElement("span");d.className="odBCFolder";d.innerHTML=mxUtils.htmlEntities(P[c].name||mxResources.get("home"));b.appendChild(d);(function(b,c){d.addEventListener("click",function(){e(null);P=P.slice(0,c);B(b.driveId,b.folderId,b.siteId,b.name)})})(P[c],c);var f=document.createElement("span");
+f.innerHTML=" &gt; ";b.appendChild(f)}null!=P[P.length-1]&&(c=document.createElement("span"),c.innerHTML=mxUtils.htmlEntities(1==P.length?mxResources.get("officeSelDiag"):P[P.length-1].name||mxResources.get("home")),b.appendChild(c))}}function y(){if(null!=H&&!T)if("sharepoint"==M)B("site",null,H.id,H.displayName);else if("site"==M)B("subsite",null,H.id,H.name);else{var b=H.folder;H=H.remoteItem?H.remoteItem:H;var c=(H.parentReference?H.parentReference.driveId:null)||M,d=H.id;b?B(c,d,null,H.name):
x()}}function B(c,g,n,m,p){function q(d){F.stop();var f=document.createElement("table");f.className="odFileListGrid";for(var g=null,k=0,n=0;null!=d&&n<d.length;n++){var m=d[n];if(1!=t||!m.webUrl||0<m.webUrl.indexOf("sharepoint.com/sites/")||0>m.webUrl.indexOf("sharepoint.com/")){var p=m.displayName||m.name,q=mxUtils.htmlEntities(m.description||p),B=Math.round(.7*b.clientWidth/10);t&&(m.folder=!0);var u=null!=m.folder;if(!l||u){var v=document.createElement("tr");v.className=k++%2?"odOddRow":"odEvenRow";
-var x=document.createElement("td");x.style.width="24px";var D=document.createElement("img");D.src="/images/"+(u?"folder.png":"file.png");D.className="odFileImg";D.width=24;x.appendChild(D);v.appendChild(x);x=document.createElement("td");u=document.createElement("span");u.className="odFileTitle";u.innerHTML=null!=p&&p.length>B?mxUtils.htmlEntities(p.substring(0,B))+"&hellip;":mxUtils.htmlEntities(p);u.setAttribute("title",q);x.appendChild(u);v.appendChild(x);f.appendChild(v);null==g&&(g=v,g.className+=
-" odRowSelected",J=m,M=c,e(J));(function(b,d){v.addEventListener("dblclick",y);v.addEventListener("click",function(){g!=d&&(g.className=g.className.replace("odRowSelected",""),g=d,g.className+=" odRowSelected",J=b,M=c,e(J))})})(m,v)}}}0==k?(d=document.createElement("div"),d.className="odEmptyFolder",d.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),C.appendChild(d)):C.appendChild(f);z();P=!1}if(!P){u(".odCatsList").style.display="block";u(".odFilesSec").style.display=
-"block";null!=N&&(N.innerHTML="",N.style.top="50%");var B=P=!0,t=0;L=arguments;var v=setTimeout(function(){P=B=!1;F.stop();f(mxResources.get("timeout"))},2E4),C=u(".odFilesList");C.innerHTML="";F.spin(C);var x;switch(c){case "recent":T=[{name:mxResources.get("recent",null,"Recent"),driveId:c}];x=k()||{};var D=[],G;for(G in x)D.push(x[G]);clearTimeout(v);q(D);return;case "shared":x="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:c}];break;case "sharepoint":x=
-"/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:c}];t=1;break;case "site":T.push({name:m,driveId:c,folderId:g,siteId:n});x="/sites/"+n+"/drives";t=2;break;case "subsite":T.push({name:m,driveId:c,folderId:g,siteId:n});x="/drives/"+n+(g?"/items/"+g:"/root")+"/children";break;case "search":c=M;T=[{driveId:c,name:mxResources.get("back",null,"Back")}];p=encodeURIComponent(p.replace(/\'/g,"\\'"));x=c?"/drives/"+c+"/root/search(q='"+p+"')":"/me/drive/root/search(q='"+
-p+"')";break;default:null==g?T=[{driveId:c}]:T.push({name:m,driveId:c,folderId:g}),x=(c?"/drives/"+c:"/me/drive")+(g?"/items/"+g:"/root")+"/children"}t||(x+=(0<x.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(x,function(b){if(B){clearTimeout(v);b=b.value||[];for(var c=t?b:[],d=0;!t&&d<b.length;d++){var e=b[d],f=e.file?e.file.mimeType:null;(e.folder||"text/html"==f||"text/xml"==
-f||"application/xml"==f||"image/png"==f||/\.svg$/.test(e.name)||/\.html$/.test(e.name)||/\.xml$/.test(e.name)||/\.png$/.test(e.name)||/\.drawio$/.test(e.name))&&c.push(e)}q(c)}},function(b){if(B){clearTimeout(v);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(ca){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));P=!1;F.stop()}})}}function C(b){Y.className=Y.className.replace("odCatSelected","");Y=b;Y.className+=" odCatSelected"}function D(b){P||
-(Z=null,B("search",null,null,null,b))}var G="";null==e&&(e=A,G='<div style="text-align: center;" class="odPreview"></div>');null==k&&(k=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(ea){}return b});null==g&&(g=function(b){if(null!=b){var c=k()||{};delete b["@microsoft.graph.downloadUrl"];c[b.id]=b;localStorage.setItem("mxODPickerRecentList",JSON.stringify(c))}});var G='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+
+var C=document.createElement("td");C.style.width="24px";var D=document.createElement("img");D.src="/images/"+(u?"folder.png":"file.png");D.className="odFileImg";D.width=24;C.appendChild(D);v.appendChild(C);C=document.createElement("td");u=document.createElement("span");u.className="odFileTitle";u.innerHTML=null!=p&&p.length>B?mxUtils.htmlEntities(p.substring(0,B))+"&hellip;":mxUtils.htmlEntities(p);u.setAttribute("title",q);C.appendChild(u);v.appendChild(C);f.appendChild(v);null==g&&(g=v,g.className+=
+" odRowSelected",H=m,M=c,e(H));(function(b,d){v.addEventListener("dblclick",y);v.addEventListener("click",function(){g!=d&&(g.className=g.className.replace("odRowSelected",""),g=d,g.className+=" odRowSelected",H=b,M=c,e(H))})})(m,v)}}}0==k?(d=document.createElement("div"),d.className="odEmptyFolder",d.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),x.appendChild(d)):x.appendChild(f);z();T=!1}if(!T){u(".odCatsList").style.display="block";u(".odFilesSec").style.display=
+"block";null!=O&&(O.innerHTML="",O.style.top="50%");var B=T=!0,t=0;J=arguments;var v=setTimeout(function(){T=B=!1;F.stop();f(mxResources.get("timeout"))},2E4),x=u(".odFilesList");x.innerHTML="";F.spin(x);var C;switch(c){case "recent":P=[{name:mxResources.get("recent",null,"Recent"),driveId:c}];C=k()||{};var D=[],E;for(E in C)D.push(C[E]);clearTimeout(v);q(D);return;case "shared":C="/me/drive/sharedWithMe";P=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:c}];break;case "sharepoint":C=
+"/sites?search=";P=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:c}];t=1;break;case "site":P.push({name:m,driveId:c,folderId:g,siteId:n});C="/sites/"+n+"/drives";t=2;break;case "subsite":P.push({name:m,driveId:c,folderId:g,siteId:n});C="/drives/"+n+(g?"/items/"+g:"/root")+"/children";break;case "search":c=M;P=[{driveId:c,name:mxResources.get("back",null,"Back")}];p=encodeURIComponent(p.replace(/\'/g,"\\'"));C=c?"/drives/"+c+"/root/search(q='"+p+"')":"/me/drive/root/search(q='"+
+p+"')";break;default:null==g?P=[{driveId:c}]:P.push({name:m,driveId:c,folderId:g}),C=(c?"/drives/"+c:"/me/drive")+(g?"/items/"+g:"/root")+"/children"}t||(C+=(0<C.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(C,function(b){if(B){clearTimeout(v);b=b.value||[];for(var c=t?b:[],d=0;!t&&d<b.length;d++){var e=b[d],f=e.file?e.file.mimeType:null;(e.folder||"text/html"==f||"text/xml"==
+f||"application/xml"==f||"image/png"==f||/\.svg$/.test(e.name)||/\.html$/.test(e.name)||/\.xml$/.test(e.name)||/\.png$/.test(e.name)||/\.drawio$/.test(e.name))&&c.push(e)}q(c)}},function(b){if(B){clearTimeout(v);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(ba){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));T=!1;F.stop()}})}}function C(b){X.className=X.className.replace("odCatSelected","");X=b;X.className+=" odCatSelected"}function E(b){T||
+(Z=null,B("search",null,null,null,b))}var D="";null==e&&(e=A,D='<div style="text-align: center;" class="odPreview"></div>');null==k&&(k=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(aa){}return b});null==g&&(g=function(b){if(null!=b){var c=k()||{};delete b["@microsoft.graph.downloadUrl"];c[b.id]=b;localStorage.setItem("mxODPickerRecentList",JSON.stringify(c))}});var D='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+
mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+
-'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+G+(m?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(p?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(l?"save":"open"))+"</button>":""),
-E=".odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+D+(m?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(p?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(l?"save":"open"))+"</button>":""),
+G=".odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(Editor.isDarkMode()?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Editor.isDarkMode()?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}",
-F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),I=new Editor,H=null,J=null,M=null,P=!1,T=[],L=null,R=null;this.getSelectedItem=function(){null!=J&&g(J);return J};if(null==u("#mxODPickerCss")){var K=document.head||document.getElementsByTagName("head")[0],S=document.createElement("style");K.appendChild(S);S.type="text/css";S.id="mxODPickerCss";S.appendChild(document.createTextNode(E))}b.innerHTML=
-G;for(var N=u(".odPreview"),Y=u("#odFiles"),G=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle"),E=0;E<G.length;E++)G[E].addEventListener("click",function(){J=R=null;if(!P)switch(C(this),this.id){case "odFiles":B();break;case "odRecent":B("recent");break;case "odShared":B("shared");break;case "odSharepoint":B("sharepoint")}});var Z=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=Z&&clearTimeout(Z);13==b.keyCode?D(c.value):Z=setTimeout(function(){D(c.value)},
-500)});u("#refreshOD").addEventListener("click",function(){null!=L&&(e(null),B.apply(this,L))});m&&u("#odBackBtn").addEventListener("click",m);p&&u("#odSubmitBtn").addEventListener("click",x);document.body.onselectstart=function(){return!1};null!=t?(m=t.pop(),"sharepoint"==t[0].driveId&&C(u("#odSharepoint")),T=t,B(m.driveId,m.folderId,m.siteId,m.name)):B()};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
+F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),I=new Editor,L=null,H=null,M=null,T=!1,P=[],J=null,U=null;this.getSelectedItem=function(){null!=H&&g(H);return H};if(null==u("#mxODPickerCss")){var K=document.head||document.getElementsByTagName("head")[0],N=document.createElement("style");K.appendChild(N);N.type="text/css";N.id="mxODPickerCss";N.appendChild(document.createTextNode(G))}b.innerHTML=
+D;for(var O=u(".odPreview"),X=u("#odFiles"),D=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle"),G=0;G<D.length;G++)D[G].addEventListener("click",function(){H=U=null;if(!T)switch(C(this),this.id){case "odFiles":B();break;case "odRecent":B("recent");break;case "odShared":B("shared");break;case "odSharepoint":B("sharepoint")}});var Z=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=Z&&clearTimeout(Z);13==b.keyCode?E(c.value):Z=setTimeout(function(){E(c.value)},
+500)});u("#refreshOD").addEventListener("click",function(){null!=J&&(e(null),B.apply(this,J))});m&&u("#odBackBtn").addEventListener("click",m);p&&u("#odSubmitBtn").addEventListener("click",x);document.body.onselectstart=function(){return!1};null!=t?(m=t.pop(),"sharepoint"==t[0].driveId&&C(u("#odSharepoint")),P=t,B(m.driveId,m.folderId,m.siteId,m.name)):B()};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};
b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(d.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(d)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+b.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
@@ -11408,7 +11413,7 @@ App.main=function(b,e){function d(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,ST
window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=n)try{var m=JSON.parse(n);for(k in l.merge)m[k]=
l.merge[k];l=m}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=c[2].getDocumentElement());"1"==
urlParams.dev||EditorUi.isElectronApp?d():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],d))},function(b){b=document.getElementById("geStatus");null!=b&&(b.innerHTML="Error loading page. <a>Please try refreshing.</a>",b.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=
-mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?"#2a2a2a":"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var b=parseInt(mxSettings.settings.autosaveDelay);!isNaN(b)&&0<b?(DrawioFile.prototype.autosaveDelay=b,EditorUi.debug("Setting autosaveDelay",b)):EditorUi.debug("Invalid autosaveDelay",b)}null!=mxSettings.settings.defaultEdgeLength&&(b=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(b)&&0<b?(Graph.prototype.defaultEdgeLength=
+mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var b=parseInt(mxSettings.settings.autosaveDelay);!isNaN(b)&&0<b?(DrawioFile.prototype.autosaveDelay=b,EditorUi.debug("Setting autosaveDelay",b)):EditorUi.debug("Invalid autosaveDelay",b)}null!=mxSettings.settings.defaultEdgeLength&&(b=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(b)&&0<b?(Graph.prototype.defaultEdgeLength=
b,EditorUi.debug("Using defaultEdgeLength",b)):EditorUi.debug("Invalid defaultEdgeLength",b))}}catch(t){null!=window.console&&console.error(t)}if(null!=Menus.prototype.defaultFonts)for(b=0;b<Menus.prototype.defaultFonts.length;b++){var c=Menus.prototype.defaultFonts[b];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}
window.onerror=function(b,c,d,e,f){EditorUi.logError("Global: "+(null!=b?b:""),c,d,e,f,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var k=document.getElementById("geInfo");null!=k&&
k.parentNode.removeChild(k)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){k=document.getElementsByTagName("script");if(null!=k&&0<k.length){var g=mxUtils.getTextContent(k[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(g).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
@@ -11469,8 +11474,8 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxVie
App.prototype.getThumbnail=function(b,e){var d=!1;try{var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),g=mxUtils.bind(this,function(b){window.clearTimeout(k);c&&e(b)});null==this.thumbImageCache&&(this.thumbImageCache={});var n=this.editor.graph,f=n.backgroundImage,l=null!=n.themes&&"darkTheme"==n.defaultThemeName;if(null!=this.pages&&(l||this.currentPage!=this.pages[0])){var m=n.getGlobalVariable,n=this.createTemporaryGraph(l?n.getDefaultStylesheet():n.getStylesheet());
n.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?n.setBackgroundImage(f):null!=p.viewState&&null!=p.viewState&&(f=p.viewState.backgroundImage,n.setBackgroundImage(f));l&&(n.defaultThemeName="default");n.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};n.getGlobalVariable=m;document.body.appendChild(n.container);n.model.setRoot(p.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,
function(b){try{n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(I){b=null}g(b)}),b,this.thumbImageCache,"#ffffff",function(){g()},null,null,null,null,null,null,n,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=n.getGraphBounds(),u=n.view.translate,v=n.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var x=b/t.width,
-x=Math.min(1,Math.min(3*b/(4*t.height),x)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-A,-z);var B=n.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";y.save();y.fillStyle=B;y.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var D=new mxJsCanvas(q),
-G=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var E=new mxImageExport;E.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};E.drawText=function(b,c){};E.drawState(n.getView().getState(n.model.root),G);G.finish(mxUtils.bind(this,function(){try{E.drawState(n.getView().getState(n.model.root),D),n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(F){q=
+x=Math.min(1,Math.min(3*b/(4*t.height),x)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-A,-z);var B=n.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";y.save();y.fillStyle=B;y.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var E=new mxJsCanvas(q),
+D=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};G.drawText=function(b,c){};G.drawState(n.getView().getState(n.model.root),D);D.finish(mxUtils.bind(this,function(){try{G.drawState(n.getView().getState(n.model.root),E),n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(F){q=
null}g(q)}));d=!0}}catch(F){d=!1,null!=n&&n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}d||window.clearTimeout(k);return d};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(d)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+1);document.cookie="MODE="+e+"; expires="+k.toUTCString()}}catch(g){}}})();
@@ -11649,140 +11654,141 @@ d.init()}else{var e=function(b){return{id:b.id,isExt:!0,url:b.downloadUrl,title:
!k.isCellLocked(k.getDefaultParent())){var b=new NewDialog(c,null,!1,function(b){c.hideDialog();if(null!=b){var d=c.editor.graph.getFreeInsertPoint();k.setSelectionCells(c.importXml(b,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(b.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});b.init()}})).isEnabled=g;var p=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});
p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});p=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});p=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});
p=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["points","inches","millimeters","meters"],c)})));p=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,
-c.editor.graph.view.unit);c.refresh()});p.setEnabled(c.canvasSupported&&9!=document.documentMode);p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.ruler});p=c.actions.addAction("fullscreen",function(){null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=document.fullscreenElement});c.actions.addAction("properties...",
-function(){var b=new FilePropertiesDialog(c);c.showDialog(b.container,320,120,!0,!0);b.init()}).isEnabled=g;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(b){k.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,84)),k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing(),this.freehandWindow.window.setVisible(k.freehand.isDrawing()))})).isEnabled=function(){return g()&&
-mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==c.pages||1>=c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),g=c.addCheckbox(b,mxResources.get("compressed"),
-!0),l=c.addCheckbox(b,mxResources.get("allPages"),!d,d);l.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled")});b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("xml",!g.checked,null,!f.checked,d||!l.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,200,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,d,e,f,g,k,l,n,m){l=[];m&&l.push("tags=%7B%7D");b=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,null,!0,l));c.showDialog(b.container,440,240,!0,!0);b.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,e,f,g,k,l,n,m,p,y){c.createHtml(b,d,e,f,g,
-k,l,n,m,p,y,mxUtils.bind(this,function(b,d){var e=c.getBaseFilename(l),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(e)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+d+"\n</body>\n</html>";c.saveData(e+(".drawio"==e.substring(e.lenth-7)?"":".drawio")+".html","html",f,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!c.isOffline()&&!c.printPdfExport){var b=null==c.pages||1>=c.pages.length,d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){m!=this&&this.checked?(x.removeAttribute("disabled"),x.checked=!k.pageVisible):(x.setAttribute("disabled","disabled"),x.checked=!1)},e=200,g=1,l=null;if(c.pdfPageExport&&!b){var n=
-function(){u.value=Math.max(1,Math.min(g,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(u.value),parseInt(q.value))))},m=c.addRadiobox(d,"pages",mxResources.get("allPages"),!0),p=c.addRadiobox(d,"pages",mxResources.get("pages")+":",!1,null,!0),q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";d.appendChild(q);var t=document.createElement("span");
-mxUtils.write(t,mxResources.get("to"));d.appendChild(t);var u=q.cloneNode(!0);d.appendChild(u);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(u,"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",n);mxEvent.addListener(u,"change",n);if(null!=c.pages&&(g=c.pages.length,null!=c.currentPage))for(n=0;n<c.pages.length;n++)if(c.currentPage==c.pages[n]){l=n+1;q.value=l;u.value=l;break}q.setAttribute("max",g);u.setAttribute("max",g);mxUtils.br(d);var v=c.addRadiobox(d,
-"pages",mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(m,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!k.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||
-mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,S=null;if(EditorUi.isElectronApp||f)S=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=m.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(g-
-1,d-1)),to:Math.max(0,Math.min(g-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!m.checked&&null==d,!x.checked,null!=A&&A.checked,null,null,z.checked,null!=S&&S.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,300,e,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",
-function(){function b(){null!=d&&d.removeDraft();c.fileLoaded(null)}var d=c.getCurrentFile();null!=d&&d.isModified()?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==k.getSelectionCount()){var b=k.getSelectionCell(),d=k.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+
-":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(b,d){c.spinner.stop();var e=new RevisionDialog(c,b,d);c.showDialog(e.container,640,480,!0,!0);e.init()}),mxUtils.bind(this,function(b){c.handleError(b)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",
-function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var b=c.getCurrentFile();null!=b&&(window.drawdata=c.getFileData(),b=null!=b.getTitle()?b.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
-(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(c);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!c.isMathEnabled();k.model.execute(b)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),p.isEnabled=g);isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
-mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var q=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});q.setToggleAction(!0);q.setSelectedCallback(function(){return q.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var b=k.getSelectionCells(),d=[],e=0;e<b.length;e++)k.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(c,d),c.showDialog(b.container,
-200,270,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var b=
-new BackgroundImageDialog(c,function(b){c.setBackgroundImage(b)});c.showDialog(b.container,320,170,!0,!0);b.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u,v){b=parseInt(b);!isNaN(b)&&0<b&&c.exportSvg(b/100,d,e,f,g,k,l,!n,!1,p,t,u,v)}),!0,null,"svg",!0)}));c.actions.put("exportPng",
-new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,d,e,f,g,l,!n,!1,null,q,null,t,u)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
-function(b,d,e,f,g){c.downloadFile(d?"xmlpng":"png",null,null,b,null,null,e,f,g)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,!1,e,f,!1,l,!n,!1,"jpeg",q,null,t,u)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&
-navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile("jpeg",null,null,b,null,null,null,f,g)}),!0,!0)}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var b=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),d=mxUtils.getXml(0==b.length?c.editor.getGraphXml():k.encodeCells(b));c.copyImage(b,d)}));p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",
-new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):
-c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",
-function(){var b=new FeedbackDialog(c);c.showDialog(b.container,610,360,!0,!1);b.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});p=c.actions.addAction("tags",
-mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
-function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));p=c.actions.addAction("findReplace...",mxUtils.bind(this,function(b,d){var e=k.isEnabled()&&(null==d||!mxEvent.isShiftDown(d)),f=e?"findReplace":"find",g=f+"Window";if(null==this[g]){var l=e?"min"==uiTheme?330:300:240;this[g]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[g].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[g].window.addListener("hide",
-function(){c.fireEvent(new mxEventObject(f))});this[g].window.setVisible(!0)}else this[g].window.setVisible(!this[g].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){var b=k.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=
-document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=c.addCheckbox(d,mxResources.get("allPages"),!b,b);f.style.marginBottom="16px";b=new CustomDialog(c,d,mxUtils.bind(this,function(){c.exportVisio(!f.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&
-"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var b=localStorage.getItem(Editor.configurationKey),d=[[mxResources.get("reset"),function(b,d){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),
-function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);
-localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!1);b.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,
-function(b,d){var e=mxUtils.bind(this,function(e){var f=""==e?mxResources.get("automatic"):mxLanguageMap[e],g=null;""!=f&&(g=b.addItem(f,null,mxUtils.bind(this,function(){mxSettings.setLanguage(e);mxSettings.save();mxClient.language=e;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),d),(e==mxLanguage||""==e&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});e("");b.addSeparator(d);for(var f in mxLanguageMap)e(f)})));
-var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(b){var c=u.apply(this,arguments);if(null!=c&&"1"!=urlParams.noLangIcon){var d=this.get("language");if(null!=d){d=c.addMenu("",d.funct);d.setAttribute("title",mxResources.get("language"));d.style.width="16px";d.style.paddingTop="2px";d.style.paddingLeft="4px";d.style.zIndex="1";d.style.position="absolute";d.style.display="block";d.style.cursor="pointer";d.style.right="17px";"atlas"==uiTheme?(d.style.top="6px",d.style.right=
-"15px"):d.style.top="min"==uiTheme?"2px":"0px";var e=document.createElement("div");e.style.backgroundImage="url("+Editor.globeImage+")";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="19px 19px";e.style.position="absolute";e.style.height="19px";e.style.width="19px";e.style.marginTop="2px";e.style.zIndex="1";d.appendChild(e);mxUtils.setOpacity(d,40);if("atlas"==uiTheme||"dark"==uiTheme)d.style.opacity="0.85",d.style.filter="invert(100%)";document.body.appendChild(d)}}return c}}c.customLayoutConfig=
-[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var b=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(b){if(0<b.length)try{var d=JSON.parse(b);c.executeLayoutList(d);c.customLayoutConfig=d}catch(D){c.handleError(D),null!=window.console&&console.error(D)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");
-b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()});var p=this.get("layout"),v=p.funct;p.funct=function(b,d){v.apply(this,arguments);b.addItem(mxResources.get("orgChart"),null,function(){function b(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?k():c.spinner.spin(document.body,mxResources.get("loading"))&&(c.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",k)})})}):mxscript("js/extensions.min.js",k))}var d=null,e=20,f=20,g=!0,k=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),n=document.createElement("div");
-n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("orgChartType")+": ");l.appendChild(n);var m=document.createElement("select");m.style.width="200px";m.style.boxSizing="border-box";for(var n=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<n.length;p++){var y=
-document.createElement("option");mxUtils.write(y,n[p]);y.value=p;2==p&&y.setAttribute("selected","selected");m.appendChild(y)}mxEvent.addListener(m,"change",function(){d=m.value});l.appendChild(m);n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("parentChildSpacing")+": ");l.appendChild(n);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);
-mxEvent.addListener(q,"change",function(){e=q.value});n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("siblingSpacing")+": ");l.appendChild(n);var t=document.createElement("input");t.type="number";t.value=f;t.style.width="200px";t.style.boxSizing="border-box";l.appendChild(t);mxEvent.addListener(t,"change",function(){f=t.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,
-355,140,!0,!0)},d,null,g());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(k);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},!1)}),d);b.addSeparator(d);c.menus.addMenuItem(b,"runLayout",d,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(b,
-["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(b){var c=mxUtils.trim(f.value);13==b.keyCode&&0<c.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host)+
-"&search="+encodeURIComponent(c)),f.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:c}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==b.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(b){document.activeElement!=f&&f.focus();mxEvent.consume(b)},function(b){mxEvent.consume(b)},function(b){mxEvent.consume(b)});window.setTimeout(function(){f.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),
-this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme - about".split(" "),d)):this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),d)}"1"==urlParams.test&&(b.addSeparator(d),this.addSubmenu("testDevelop",b,d))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var b=prompt("Language Code",Graph.diagramLanguage||"");null!=b&&(Graph.diagramLanguage=0<b.length?b:null,k.refresh())});
-if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testDownloadRtModel=Export RT model");mxResources.parse("testImportRtModel=Import RT model");
-c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var b=k.cloneCells(k.getSelectionCells()),d=k.getBoundingBoxFromGeometry(b),b=k.moveCells(b,-d.x,-d.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(b)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=k.getGraphBounds(),c=k.view.translate,d=k.view.scale;k.insertVertex(k.getDefaultParent(),
-null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,
-e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var n=e[l];if(null!=n.id&&0<n.id.length)if(null==b[n.id]){b[n.id]=n.id;var m=n.getAttribute("parent");null==m?null!=g?mxLog.debug(d+": Multiple roots: "+n.id):g=n.id:(null==f[m]&&(f[m]=[]),f[m].push(n.id))}else k[n.id]=n.id}0<Object.keys(k).length?(e=d+": "+Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(d+": Checked");var p={};null==g?mxLog.debug(d+": No root"):(c(g),Object.keys(p).length!=
-Object.keys(b).length&&(mxLog.debug(d+": Invalid tree: (see console)"),console.log(d+": Invalid tree",f)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var e=mxUtils.parseXml(b),f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");
-for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var x=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},
-null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2)}catch(D){c.handleError(D)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+
-(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var b=new mxImageExport,c=k.getGraphBounds(),d=k.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-
-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var g=0,l=e.save;e.save=function(){g++;l.apply(this,arguments)};var n=e.restore;e.restore=function(){g--;n.apply(this,arguments)};var m=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",b,g);m.apply(this,arguments);mxLog.debug("leaving shape",b,g)};b.drawState(k.getView().getState(k.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
-mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,
-!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){k.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&
-c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",b,function(b,d,e,f,g,k,l,n,m,p,y){c.createHtml(b,d,e,f,g,k,l,n,m,p,y,mxUtils.bind(this,function(b,d){var e=new EmbedDialog(c,b+"\n"+d,null,null,function(){var e=window.open(),f=e.document;if(null!=f){"CSS1Compat"===document.compatMode&&f.writeln("<!DOCTYPE html>");f.writeln("<html>");f.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head>');f.writeln("<body>");f.writeln(b);var g=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;g&&f.writeln(d);f.writeln("</body>");f.writeln("</html>");f.close();if(!g){var k=e.document.createElement("div");k.marginLeft="26px";k.marginTop="26px";mxUtils.write(k,mxResources.get("updatingDocument"));g=e.document.createElement("img");g.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");g.style.marginLeft=
-"6px";k.appendChild(g);e.document.body.insertBefore(k,e.document.body.firstChild);window.setTimeout(function(){var b=document.createElement("script");b.type="text/javascript";b.src=/<script.*?src="(.*?)"/.exec(d)[1];f.body.appendChild(b);k.parentNode.removeChild(k)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(e.container,440,240,!0,!0);e.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var b=c.getCurrentFile();null!=b&&
-c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(d){c.spinner.stop();null!=d?(d=new EmbedDialog(c,'<img src="'+(b.constructor!=DriveFile?d:"https://drive.google.com/uc?id="+b.getId())+'"/>'),c.showDialog(d.container,440,240,!0,!0),d.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,
-mxResources.get("loading"))&&c.createEmbedImage(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(b,d,e,f,g,k,
-function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(b.height/k.view.scale)+2,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,
-mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var y=[];m&&y.push("tags=%7B%7D");p=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+n+';" src="'+c.createLink(b,d,e,f,g,k,p,null,y)+'"></iframe>');c.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,
-mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=["border=0"];m&&n.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n,!0));c.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();
-var n=[];m&&n.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});
-c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();b=new GoogleSitesDialog(c,b);c.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",
-function(){c.showDialog((new PluginsDialog(c)).container,360,170,!0,!1)});p=c.actions.addAction("search",function(){var b=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(b){k.isEditing()&&k.stopEditing();var d="0"!=
-urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));b=c.getCurrentFile();null==b||b.constructor==EmbedFile||b.constructor==LocalFile&&null==b.mode||c.saveFile()},c.actions.addAction("saveAndExit",
-function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){var b=function(){c.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",
-new Menu(mxUtils.bind(this,function(b,d){c.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],d),c.jpgSupported&&this.addMenuItems(b,["exportJpg"],d)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],d);this.addMenuItems(b,["exportSvg","-"],d);c.isOffline()||c.printPdfExport?this.addMenuItems(b,["exportPdf"],d):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],d);mxClient.IS_IE||"undefined"===typeof VsdxExport&&
-c.isOffline()||this.addMenuItems(b,["exportVsdx"],d);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],d);c.isOffline()||(b.addSeparator(d),this.addMenuItem(b,"export",d).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,d){function e(b){b.pickFile(function(d){c.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(d,function(b){var d="data:image/"==b.getData().substring(0,11)?p(b.getTitle()):
-"text/xml";/\.svg$/i.test(b.getTitle())&&!c.editor.isDataSvg(b.getData())&&(b.setData(Editor.createSvgDataUri(b.getData())),d="image/svg+xml");g(b.getData(),d,b.getTitle())},function(b){c.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==c.drive)},!0)}var g=mxUtils.bind(this,function(b,d,e){var f=k.view,g=k.getGraphBounds(),l=k.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*k.gridSize)),n=k.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*k.gridSize));"data:image/"==
-b.substring(0,11)?c.loadImage(b,mxUtils.bind(this,function(f){var g=!0,m=mxUtils.bind(this,function(){c.resizeImage(f,b,mxUtils.bind(this,function(f,m,p){f=g?Math.min(1,Math.min(c.maxImageSize/m,c.maxImageSize/p)):1;c.importFile(b,d,l,n,Math.round(m*f),Math.round(p*f),e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),g)});b.length>c.resampleThreshold?c.confirmImageResize(function(b){g=b;m()}):m()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):
-c.importFile(b,d,l,n,0,0,e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),p=mxUtils.bind(this,function(b){var c="text/xml";/\.png$/i.test(b)?c="image/png":/\.jpe?g$/i.test(b)?c="image/jpg":/\.gif$/i.test(b)?c="image/gif":/\.pdf$/i.test(b)&&(c="application/pdf");return c});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(c.drive)},d):n&&"function"===typeof window.DriveClient&&
-b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(c.oneDrive)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(c.dropbox)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(c.gitHub)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){e(c.gitLab)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){e(c.notion)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(c.trello)},d):m&&"function"===typeof window.TrelloClient&&
-b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("import"),
-function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(c){g(c,d,b)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==d)}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,d){var e="1"==urlParams.sketch?
-"sketch":mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"!=e&&"atlas"!=e&&"dark"!=e&&"min"!=e&&"sketch"!=e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),
-null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},d);"min"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},d);"atlas"==e&&b.addCheckmark(f,Editor.checkmarkImage);if("dark"==e||!mxClient.IS_IE&&!mxClient.IS_IE11)f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},
-d),"dark"==e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},d);"sketch"==e&&b.addCheckmark(f,Editor.checkmarkImage)})));p=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b)if(b.constructor==LocalFile&&null!=b.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(d,e){b.invalidFileHandle=
-null;b.fileHandle=d;b.title=e.name;b.desc=e;c.save(e.name)}),null,c.createFileSystemOptions(b.getTitle()));else{var d=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,d=new FilenameDialog(this.editorUi,d,mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&null!=b&&c!=b.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(c,mxUtils.bind(this,function(b){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(b){this.editorUi.handleError(b,
-null!=b?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(d.container,340,96,!0,!0);d.init()}}));p.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",
-mxUtils.bind(this,function(){var b=c.getCurrentFile();if(null!=b){var d=c.getCopyFilename(b);b.constructor==DriveFile?(d=new CreateDialog(c,d,mxUtils.bind(this,function(d,e){"_blank"==e?c.editor.editAsNew(c.getFileData(),d):("download"==e&&(e=App.MODE_GOOGLE),null!=d&&0<d.length&&(e==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(d,mxUtils.bind(this,function(d){b.desc=d;b.save(!1,mxUtils.bind(this,function(){c.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),
-mxUtils.bind(this,function(b){c.handleError(b)}))}),mxUtils.bind(this,function(b){c.handleError(b)})):c.createFile(d,c.getFileData(!0),null,e)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(d.container,420,380,!0,!0),d.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),d)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=c.getCurrentFile();
-if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var d=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var e=0;e<b.desc.parents.length;e++)if(b.desc.parents[e].isRoot){d=!0;break}c.pickFolder(b.getMode(),mxUtils.bind(this,function(d){c.spinner.spin(document.body,mxResources.get("moving"))&&b.move(d,mxUtils.bind(this,function(b){c.spinner.stop()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),null,!0,d)}}));this.put("publish",new Menu(mxUtils.bind(this,function(b,
-c){this.addMenuItems(b,["publishLink"],c)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=c.getCurrentFile();null!=b&&b.share()}catch(B){c.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,
-d){var e=c.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||this.addMenuItems(b,["liveImage","-"],d);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],d);navigator.standalone||c.isOffline()||this.addMenuItems(b,["embedIframe"],d);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(b,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),d)})));c.addInsertItem=function(b,d,e,f){("plantUml"!=
-f||EditorUi.enablePlantUml&&!c.isOffline())&&b.addItem(e,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f||"mermaid"==f){var b=new ParseDialog(c,e,f);c.showDialog(b.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,g())};var A=function(b,d,e,f){var g=new mxCell(b,new mxGeometry(0,0,d,e),f);g.vertex=!0;b=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([g],
-!0));g.geometry.x=b.x;g.geometry.y=b.y;k.getModel().beginUpdate();try{g=k.addCell(g),k.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(g);k.setSelectionCell(g);k.container.focus();k.editAfterInsert&&k.startEditing(g);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(g))},0);return g};c.actions.put("insertText",new Action(mxResources.get("text"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
-k.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),
-function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+
-"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,
-function(b,d){c.addInsertMenuItems(b,d,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,["fromText","plantUml","mermaid","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},d,null,g())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=
-e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+
-mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickFile(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},
-d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(c,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
-d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},
-d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickLibrary(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},
-d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=b;c.editor.isCorsEnabledForUrl(b)||(d=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(d,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){c.spinner.stop();
-try{c.loadLibrary(new UrlLibrary(this,d.getText(),b))}catch(F){c.handleError(F,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d));"1"==urlParams.confLib&&(b.addSeparator(d),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},
-d))})));this.put("edit",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));p=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",
-function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var b=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(b);this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
-function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var p=this.get("viewPanels"),z=p.funct;p.funct=function(b,d){z.apply(this,arguments);c.menus.addMenuItems(b,["tags"],d);c.commentsSupported()&&c.menus.addMenuItems(b,["comments"],d)};this.put("view",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,(null!=
-this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],d);if(isLocalStorage||mxClient.IS_CHROMEAPP){var e=this.addMenuItem(b,"scratchpad",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(b,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",b,d);this.addMenuItems(b,"- scrollbars tooltips ruler - grid guides".split(" "),
-d);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",d);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),d);"1"!=urlParams.sketch&&this.addMenuItems(b,["-","fullscreen"],d)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,d){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",b,d),b.addSeparator(d));"1"!=urlParams.embed&&(this.addSubmenu("theme",b,d),b.addSeparator(d));if("undefined"!==
-typeof MathJax){var e=this.addMenuItem(b,"mathematicalTypesetting",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}this.addMenuItems(b,["copyConnect","collapseExpand","-"],d);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],d);"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],d);b.addSeparator(d);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,
-"plugins",d);this.addMenuItems(b,["-","editDiagram"],d);Graph.translateDiagram&&this.addMenuItems(b,["diagramLanguage"]);this.addMenuItems(b,["-","configuration"],d);b.addSeparator(d);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function b(b){return{id:b.id,isExt:!0,url:b.downloadUrl,title:b.title,imgUrl:b.thumbnailLink,changedBy:b.lastModifyingUserName,lastModifiedOn:b.modifiedDate}}var d=new TemplatesDialog(c,function(b){console.log(arguments)},null,null,null,"user",function(d,
-e,f){var g=new Date;g.setDate(g.getDate()-7);c.drive.listFiles(null,g,f?!0:!1,function(c){for(var e=[],f=0;f<c.items.length;f++)e.push(b(c.items[f]));d(e)},e)},function(d,e,f,g){c.drive.listFiles(d,null,g?!0:!1,function(c){for(var d=[],f=0;f<c.items.length;f++)d.push(b(c.items[f]));e(d)},f)},function(b,d,e){c.drive.getFile(b.id,function(b){d(b.data)},e)},null,function(b){b({Test:[]},1)},!0,!1);c.showDialog(d.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(b,"templates",
-d))})));this.put("file",new Menu(mxUtils.bind(this,function(b,d){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,d),this.addSubmenu("exportAs",b,d),this.addSubmenu("embed",b,d),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],d),this.addSubmenu("newLibrary",b,d),this.addSubmenu("openLibraryFrom",b,d)),c.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],d),this.addMenuItems(b,["-","pageSetup","print","-","rename"],d),"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&
-this.addMenuItems(b,["saveAndExit"],d):(this.addMenuItems(b,["save"],d),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],d)),"1"!=urlParams.noExitBtn&&this.addMenuItems(b,["exit"],d);else{var e=this.editorUi.getCurrentFile();if(null!=e&&e.constructor==DriveFile){e.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],d);this.addMenuItems(b,["save","-","share"],d);var f=this.addMenuItem(b,"synchronize",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(f,
-"https://www.diagrams.net/doc/faq/synchronize");b.addSeparator(d)}else this.addMenuItems(b,["new"],d);this.addSubmenu("openFrom",b,d);isLocalStorage&&this.addSubmenu("openRecent",b,d);null!=e&&e.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],d):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile&&null==e.fileHandle||(b.addSeparator(d),f=this.addMenuItem(b,"synchronize",d),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
-this.addLinkToItem(f,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(b,["-","save","saveAs","-"],d),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==e||this.addMenuItems(b,["share","-"],d),this.addMenuItems(b,["rename"],d),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):(this.addMenuItems(b,["makeCopy"],d),null!=e&&e.constructor==OneDriveFile&&this.addMenuItems(b,
-["moveToFolder"],d)));b.addSeparator(d);this.addSubmenu("importFrom",b,d);this.addSubmenu("exportAs",b,d);b.addSeparator(d);this.addSubmenu("embed",b,d);this.addSubmenu("publish",b,d);b.addSeparator(d);this.addSubmenu("newLibrary",b,d);this.addSubmenu("openLibraryFrom",b,d);c.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],d);null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-",
-"properties"]));this.addMenuItems(b,["-","pageSetup"],d);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],d);this.addMenuItems(b,["-","close"])}})));b.prototype.execute=function(){var b=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var c=b.extFonts,d=0;null!=c&&d<c.length;d++){var e=document.getElementById("extFont_"+
-c[d].name);null!=e&&e.parentNode.removeChild(e)}b.extFonts=[];for(d=0;null!=this.previousExtFonts&&d<this.previousExtFonts.length;d++)this.ui.editor.graph.addExtFont(this.previousExtFonts[d].name,this.previousExtFonts[d].url);this.previousExtFonts=c};this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,e){for(var f=mxUtils.bind(this,function(f,g,k,l,n){var m=c.editor.graph;l=this.styleChange(d,l||f,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],null,e,function(){"1"!=urlParams["ext-fonts"]?m.setFont(f,g):(document.execCommand("fontname",!1,f),m.addExtFont(f,g));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],"cells",[m.cellEditor.getEditingCell()]))},function(){m.updateLabelElements(m.getSelectionCells(),
-function(b){b.removeAttribute("face");b.style.fontFamily=null;"PRE"==b.nodeName&&m.replaceElement(b,"div")});"1"==urlParams["ext-fonts"]&&m.addExtFont(f,g)});k&&(k=document.createElement("span"),k.className="geSprite geSprite-delete",k.style.cursor="pointer",k.style.display="inline-block",l.firstChild.nextSibling.nextSibling.appendChild(k),mxEvent.addListener(k,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(d){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[f.toLowerCase()];
-for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==f&&this.customFonts[e].url==g){this.customFonts.splice(e,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var k=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=k&&0<k.length)for(e=0;e<k.length;e++)if(k[e].name==f){k.splice(e,1);break}for(var l=mxUtils.clone(this.customFonts),e=0;e<l.length;e++)if(l[e].name==f){l.splice(e,1);break}e=new b(this.editorUi,k,l);this.editorUi.editor.graph.model.execute(e)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(d)})));Graph.addFont(f,g);l.firstChild.nextSibling.style.fontFamily=f;null!=n&&l.setAttribute("title",n)}),g={},k=0;k<this.defaultFonts.length;k++){var l=this.defaultFonts[k];"string"===typeof l?f(l):null!=l.fontFamily&&null!=l.fontUrl&&(g[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,f(l.fontFamily,l.fontUrl))}d.addSeparator(e);if("1"!=urlParams["ext-fonts"]){for(var l=function(b){var c=encodeURIComponent(b.name)+(null==b.url?"":"@"+encodeURIComponent(b.url));
-if(!g[c]){for(var d=b.name,e=0;null!=m[d.toLowerCase()];)d=b.name+" ("+ ++e+")";null==n[c]&&(p.push({name:b.name,url:b.url,label:d,title:b.url}),m[d.toLowerCase()]=b,n[c]=b)}},n={},m={},p=[],k=0;k<this.customFonts.length;k++)l(this.customFonts[k]);for(var q in Graph.recentCustomFonts)l(Graph.recentCustomFonts[q]);p.sort(function(b,c){return b.label<c.label?-1:b.label>c.label?1:0});if(0<p.length){for(k=0;k<p.length;k++)f(p[k].name,p[k].url,!0,p[k].label,p[k].url);d.addSeparator(e)}d.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),e);d.addSeparator(e)}else{q=this.editorUi.editor.graph.extFonts;if(null!=q&&0<q.length){for(var l={},t=!1,k=0;k<this.customFonts.length;k++)l[this.customFonts[k].name]=!0;for(k=0;k<q.length;k++)l[q[k].name]||(this.customFonts.push(q[k]),t=!0);t&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(k=
-0;k<this.customFonts.length;k++)q=this.customFonts[k].name,l=this.customFonts[k].url,f(q,l,!0),this.editorUi.editor.graph.addExtFont(q,l,!0);d.addSeparator(e);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var d=new b(this.editorUi,[],[]);c.editor.graph.model.execute(d)}),e);d.addSeparator(e)}}d.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var b=this.editorUi.editor.graph,c=b.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],d=
-"s",e=null;if("1"!=urlParams["ext-fonts"]&&b.isEditing()){var f=b.getSelectedEditingElement();null!=f&&(f=mxUtils.getCurrentStyle(f),null!=f&&(c=Graph.stripQuotes(f.fontFamily),e=Graph.getFontUrl(c,null),null!=e&&(Graph.isGoogleFontUrl(e)?(e=null,d="g"):d="w")))}else f=b.getView().getState(b.getSelectionCell()),null!=f&&(c=f.style[mxConstants.STYLE_FONTFAMILY]||c,"1"!=urlParams["ext-fonts"]?(f=f.style.fontSource,null!=f&&(f=decodeURIComponent(f),Graph.isGoogleFontUrl(f)?d="g":(d="w",e=f))):(d=f.style.FType||
-d,"w"==d&&(e=this.editorUi.editor.graph.extFonts,f=null,null!=e&&(f=e.find(function(b){return b.name==c})),e=null!=f?f.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=e&&e.substring(0,PROXY_URL.length)==PROXY_URL&&(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)));var g=null;document.activeElement==b.cellEditor.textarea&&(g=b.cellEditor.saveSelection());d=new FontDialog(this.editorUi,c,e,d,mxUtils.bind(this,function(c,d,e){null!=g&&(b.cellEditor.restoreSelection(g),g=null);
-if(null!=c&&0<c.length)if("1"!=urlParams["ext-fonts"]&&b.isEditing())b.setFont(c,d);else{b.getModel().beginUpdate();try{b.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),b.setCellStyles("fontSource",null!=d?encodeURIComponent(d):null),b.setCellStyles("FType",null)):(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),"s"!=e&&(b.setCellStyles("FType",e),0==d.indexOf("http://")&&(d=PROXY_URL+"?url="+encodeURIComponent(d)),this.editorUi.editor.graph.addExtFont(c,
-d)));e=!0;for(var f=0;f<this.customFonts.length;f++)if(this.customFonts[f].name==c){e=!1;break}e&&(this.customFonts.push({name:c,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{b.getModel().endUpdate()}}}));this.editorUi.showDialog(d.container,380,Editor.enableWebFonts?250:180,!0,!0);d.init()}),e,null,!0)})))}})();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")};
+c.editor.graph.view.unit);c.refresh()});p.setEnabled(c.canvasSupported&&9!=document.documentMode);p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.ruler});p=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible="1"==urlParams.embedInline||document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);
+p.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var b=new FilePropertiesDialog(c);c.showDialog(b.container,320,120,!0,!0);b.init()}).isEnabled=g;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(b){k.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,84)),
+k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing(),this.freehandWindow.window.setVisible(k.freehand.isDrawing()))})).isEnabled=function(){return g()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==c.pages||1>=c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+b.appendChild(e);var f=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),g=c.addCheckbox(b,mxResources.get("compressed"),!0),l=c.addCheckbox(b,mxResources.get("allPages"),!d,d);l.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled")});b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("xml",!g.checked,null,!f.checked,d||!l.checked)}),null,mxResources.get("export"));c.showDialog(b.container,
+300,200,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,d,e,f,g,k,l,n,m){l=[];m&&l.push("tags=%7B%7D");b=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,null,!0,l));c.showDialog(b.container,440,240,!0,!0);b.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,e,f,g,k,l,n,m,p,y){c.createHtml(b,d,e,f,g,k,l,n,m,p,y,mxUtils.bind(this,function(b,d){var e=c.getBaseFilename(l),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(e)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+d+"\n</body>\n</html>";c.saveData(e+(".drawio"==e.substring(e.lenth-7)?"":".drawio")+
+".html","html",f,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var b=null==c.pages||1>=c.pages.length,d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){m!=this&&this.checked?
+(x.removeAttribute("disabled"),x.checked=!k.pageVisible):(x.setAttribute("disabled","disabled"),x.checked=!1)},e=200,g=1,l=null;if(c.pdfPageExport&&!b){var n=function(){u.value=Math.max(1,Math.min(g,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(u.value),parseInt(q.value))))},m=c.addRadiobox(d,"pages",mxResources.get("allPages"),!0),p=c.addRadiobox(d,"pages",mxResources.get("pages")+":",!1,null,!0),q=document.createElement("input");q.style.cssText=
+"margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";d.appendChild(q);var t=document.createElement("span");mxUtils.write(t,mxResources.get("to"));d.appendChild(t);var u=q.cloneNode(!0);d.appendChild(u);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(u,"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",n);mxEvent.addListener(u,"change",n);if(null!=c.pages&&(g=c.pages.length,null!=c.currentPage))for(n=
+0;n<c.pages.length;n++)if(c.currentPage==c.pages[n]){l=n+1;q.value=l;u.value=l;break}q.setAttribute("max",g);u.setAttribute("max",g);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(m,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),
+x=c.addCheckbox(d,mxResources.get("crop"),!k.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,N=null;if(EditorUi.isElectronApp||f)N=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,
+d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=m.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(g-1,d-1)),to:Math.max(0,Math.min(g-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!m.checked&&null==d,!x.checked,null!=A&&A.checked,null,null,z.checked,null!=N&&N.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,300,e,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
+c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function b(){null!=d&&d.removeDraft();c.fileLoaded(null)}var d=c.getCurrentFile();null!=d&&d.isModified()?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==k.getSelectionCount()){var b=
+k.getSelectionCell(),d=k.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(b,d){c.spinner.stop();var e=new RevisionDialog(c,b,d);c.showDialog(e.container,640,480,!0,!0);e.init()}),mxUtils.bind(this,
+function(b){c.handleError(b)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var b=c.getCurrentFile();null!=b&&(window.drawdata=
+c.getFileData(),b=null!=b.getTitle()?b.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(c);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!c.isMathEnabled();k.model.execute(b)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),
+p.isEnabled=g);isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var q=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});q.setToggleAction(!0);q.setSelectedCallback(function(){return q.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var b=
+k.getSelectionCells(),d=[],e=0;e<b.length;e++)k.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(c,d),c.showDialog(b.container,200,270,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},
+null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var b=new BackgroundImageDialog(c,function(b){c.setBackgroundImage(b)});c.showDialog(b.container,320,170,!0,!0);b.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
+function(b,d,e,f,g,k,l,n,m,p,q,t,u,v){b=parseInt(b);!isNaN(b)&&0<b&&c.exportSvg(b/100,d,e,f,g,k,l,!n,!1,p,t,u,v)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,d,e,f,g,l,!n,!1,null,q,null,t,u)}),
+!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile(d?"xmlpng":"png",null,null,b,null,null,e,f,g)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
+function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,!1,e,f,!1,l,!n,!1,"jpeg",q,null,t,u)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile("jpeg",null,null,b,null,null,null,f,g)}),!0,!0)}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var b=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),d=mxUtils.getXml(0==
+b.length?c.editor.getGraphXml():k.encodeCells(b));c.copyImage(b,d)}));p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",
+function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var b=new FeedbackDialog(c);c.showDialog(b.container,610,360,!0,!1);b.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):
+c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),
+this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));p=c.actions.addAction("findReplace...",mxUtils.bind(this,function(b,d){var e=k.isEnabled()&&(null==d||!mxEvent.isShiftDown(d)),f=e?"findReplace":"find",g=f+"Window";if(null==this[g]){var l=e?"min"==uiTheme?330:
+300:240;this[g]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[g].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[g].window.addListener("hide",function(){c.fireEvent(new mxEventObject(f))});this[g].window.setVisible(!0)}else this[g].window.setVisible(!this[g].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){var b=k.isEnabled()?"findReplaceWindow":
+"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=c.addCheckbox(d,mxResources.get("allPages"),
+!b,b);f.style.marginBottom="16px";b=new CustomDialog(c,d,mxUtils.bind(this,function(){c.exportVisio(!f.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var b=localStorage.getItem(Editor.configurationKey),d=[[mxResources.get("reset"),function(b,d){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),mxEvent.isShiftDown(b)&&
+(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(D){c.handleError(D)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);
+b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(D){c.handleError(D)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
+"600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!1);b.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(b,d){var e=mxUtils.bind(this,function(e){var f=""==e?mxResources.get("automatic"):mxLanguageMap[e],g=null;""!=f&&(g=b.addItem(f,null,mxUtils.bind(this,function(){mxSettings.setLanguage(e);mxSettings.save();mxClient.language=e;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
+d),(e==mxLanguage||""==e&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});e("");b.addSeparator(d);for(var f in mxLanguageMap)e(f)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(b){var c=u.apply(this,arguments);if(null!=c&&"1"!=urlParams.noLangIcon){var d=this.get("language");if(null!=d){d=c.addMenu("",d.funct);d.setAttribute("title",mxResources.get("language"));d.style.width="16px";d.style.paddingTop="2px";d.style.paddingLeft="4px";d.style.zIndex=
+"1";d.style.position="absolute";d.style.display="block";d.style.cursor="pointer";d.style.right="17px";"atlas"==uiTheme?(d.style.top="6px",d.style.right="15px"):d.style.top="min"==uiTheme?"2px":"0px";var e=document.createElement("div");e.style.backgroundImage="url("+Editor.globeImage+")";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="19px 19px";e.style.position="absolute";e.style.height="19px";e.style.width="19px";e.style.marginTop="2px";e.style.zIndex=
+"1";d.appendChild(e);mxUtils.setOpacity(d,40);if("atlas"==uiTheme||"dark"==uiTheme)d.style.opacity="0.85",d.style.filter="invert(100%)";document.body.appendChild(d)}}return c}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var b=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(b){if(0<b.length)try{var d=
+JSON.parse(b);c.executeLayoutList(d);c.customLayoutConfig=d}catch(E){c.handleError(E),null!=window.console&&console.error(E)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()});var p=this.get("layout"),v=p.funct;p.funct=function(b,d){v.apply(this,arguments);b.addItem(mxResources.get("orgChart"),null,function(){function b(){"undefined"!==typeof mxOrgChartLayout||
+c.loadingOrgChart||c.isOffline(!0)?k():c.spinner.spin(document.body,mxResources.get("loading"))&&(c.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",k)})})}):mxscript("js/extensions.min.js",k))}var d=null,e=20,f=20,g=!0,k=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&
+null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("orgChartType")+": ");l.appendChild(n);var m=document.createElement("select");m.style.width="200px";m.style.boxSizing="border-box";for(var n=[mxResources.get("linear"),
+mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<n.length;p++){var y=document.createElement("option");mxUtils.write(y,n[p]);y.value=p;2==p&&y.setAttribute("selected","selected");m.appendChild(y)}mxEvent.addListener(m,"change",function(){d=m.value});l.appendChild(m);n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";
+n.style.width="140px";mxUtils.write(n,mxResources.get("parentChildSpacing")+": ");l.appendChild(n);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("siblingSpacing")+": ");l.appendChild(n);var t=document.createElement("input");
+t.type="number";t.value=f;t.style.width="200px";t.style.boxSizing="border-box";l.appendChild(t);mxEvent.addListener(t,"change",function(){f=t.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,g());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(k);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},
+!1)}),d);b.addSeparator(d);c.menus.addMenuItem(b,"runLayout",d,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft=
+"8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(b){var c=mxUtils.trim(f.value);13==b.keyCode&&0<c.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host)+"&search="+encodeURIComponent(c)),f.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:c}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==b.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);
+mxEvent.addGestureListeners(f,function(b){document.activeElement!=f&&f.focus();mxEvent.consume(b)},function(b){mxEvent.consume(b)},function(b){mxEvent.consume(b)});window.setTimeout(function(){f.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme - about".split(" "),d)):this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),d)}"1"==urlParams.test&&(b.addSeparator(d),
+this.addSubmenu("testDevelop",b,d))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var b=prompt("Language Code",Graph.diagramLanguage||"");null!=b&&(Graph.diagramLanguage=0<b.length?b:null,k.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");
+mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testDownloadRtModel=Export RT model");mxResources.parse("testImportRtModel=Import RT model");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var b=k.cloneCells(k.getSelectionCells()),d=k.getBoundingBoxFromGeometry(b),b=k.moveCells(b,-d.x,-d.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+
+d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(b)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=k.getGraphBounds(),c=k.view.translate,d=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):
+"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var n=e[l];if(null!=n.id&&0<n.id.length)if(null==b[n.id]){b[n.id]=n.id;var m=n.getAttribute("parent");null==m?null!=g?mxLog.debug(d+": Multiple roots: "+n.id):g=n.id:(null==f[m]&&(f[m]=
+[]),f[m].push(n.id))}else k[n.id]=n.id}0<Object.keys(k).length?(e=d+": "+Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(d+": Checked");var p={};null==g?mxLog.debug(d+": No root"):(c(g),Object.keys(p).length!=Object.keys(b).length&&(mxLog.debug(d+": Invalid tree: (see console)"),console.log(d+": Invalid tree",f)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var e=mxUtils.parseXml(b),
+f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(I){c.handleError(I),null!=window.console&&console.error(I)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var x=
+null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(D){c.handleError(D)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,
+e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2)}catch(E){c.handleError(E)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,
+function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var b=new mxImageExport,c=k.getGraphBounds(),d=k.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var g=0,l=e.save;e.save=function(){g++;l.apply(this,arguments)};var n=e.restore;e.restore=function(){g--;n.apply(this,arguments)};var m=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",
+b,g);m.apply(this,arguments);mxLog.debug("leaving shape",b,g)};b.drawState(k.getView().getState(k.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
+c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){k.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,
+b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",b,function(b,d,e,f,g,k,l,n,m,p,y){c.createHtml(b,d,e,f,g,k,l,n,m,p,y,mxUtils.bind(this,function(b,
+d){var e=new EmbedDialog(c,b+"\n"+d,null,null,function(){var e=window.open(),f=e.document;if(null!=f){"CSS1Compat"===document.compatMode&&f.writeln("<!DOCTYPE html>");f.writeln("<html>");f.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');f.writeln("<body>");f.writeln(b);var g=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;g&&f.writeln(d);f.writeln("</body>");f.writeln("</html>");f.close();if(!g){var k=e.document.createElement("div");
+k.marginLeft="26px";k.marginTop="26px";mxUtils.write(k,mxResources.get("updatingDocument"));g=e.document.createElement("img");g.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");g.style.marginLeft="6px";k.appendChild(g);e.document.body.insertBefore(k,e.document.body.firstChild);window.setTimeout(function(){var b=document.createElement("script");b.type="text/javascript";b.src=/<script.*?src="(.*?)"/.exec(d)[1];f.body.appendChild(b);k.parentNode.removeChild(k)},
+20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(e.container,440,240,!0,!0);e.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var b=c.getCurrentFile();null!=b&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(d){c.spinner.stop();null!=d?(d=new EmbedDialog(c,'<img src="'+(b.constructor!=DriveFile?d:"https://drive.google.com/uc?id="+b.getId())+'"/>'),c.showDialog(d.container,
+440,240,!0,!0),d.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),
+c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(b.height/k.view.scale)+2,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var y=[];m&&y.push("tags=%7B%7D");p=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+n+';" src="'+c.createLink(b,d,e,f,g,k,p,null,
+y)+'"></iframe>');c.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=["border=0"];m&&n.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n,!0));c.showDialog(l.container,
+440,240,!0,!0);l.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=[];m&&n.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});
+c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();b=new GoogleSitesDialog(c,b);c.showDialog(b.container,420,
+256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,360,170,!0,!1)});p=c.actions.addAction("search",function(){var b=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=
+!b,mxSettings.save())});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(b){k.isEditing()&&k.stopEditing();var d="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,
+"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));b=c.getCurrentFile();null==b||b.constructor==EmbedFile||b.constructor==LocalFile&&null==b.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var b=function(){c.editor.modified=
+!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,d){c.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],d),c.jpgSupported&&this.addMenuItems(b,["exportJpg"],d)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+this.addMenuItems(b,["exportPng","exportJpg"],d);this.addMenuItems(b,["exportSvg","-"],d);c.isOffline()||c.printPdfExport?this.addMenuItems(b,["exportPdf"],d):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],d);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(b,["exportVsdx"],d);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],d);c.isOffline()||(b.addSeparator(d),this.addMenuItem(b,"export",d).firstChild.nextSibling.innerHTML=
+mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(b,d){function e(b){b.pickFile(function(d){c.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(d,function(b){var d="data:image/"==b.getData().substring(0,11)?p(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!c.editor.isDataSvg(b.getData())&&(b.setData(Editor.createSvgDataUri(b.getData())),d="image/svg+xml");g(b.getData(),d,b.getTitle())},function(b){c.handleError(b,null!=b?mxResources.get("errorLoadingFile"):
+null)},b==c.drive)},!0)}var g=mxUtils.bind(this,function(b,d,e){var f=k.view,g=k.getGraphBounds(),l=k.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*k.gridSize)),n=k.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*k.gridSize));"data:image/"==b.substring(0,11)?c.loadImage(b,mxUtils.bind(this,function(f){var g=!0,m=mxUtils.bind(this,function(){c.resizeImage(f,b,mxUtils.bind(this,function(f,m,p){f=g?Math.min(1,Math.min(c.maxImageSize/m,c.maxImageSize/p)):1;c.importFile(b,d,
+l,n,Math.round(m*f),Math.round(p*f),e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),g)});b.length>c.resampleThreshold?c.confirmImageResize(function(b){g=b;m()}):m()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(b,d,l,n,0,0,e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),p=mxUtils.bind(this,function(b){var c="text/xml";/\.png$/i.test(b)?
+c="image/png":/\.jpe?g$/i.test(b)?c="image/jpg":/\.gif$/i.test(b)?c="image/gif":/\.pdf$/i.test(b)&&(c="application/pdf");return c});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(c.drive)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",
+null,function(){e(c.oneDrive)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(c.dropbox)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",
+null,function(){e(c.gitHub)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){e(c.gitLab)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){e(c.notion)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(c.trello)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&
+"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";
+c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(c){g(c,d,b)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==d)}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,d){var e="1"==urlParams.sketch?"sketch":mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},
+d);"kennedy"!=e&&"atlas"!=e&&"dark"!=e&&"min"!=e&&"sketch"!=e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},d);"min"==e&&b.addCheckmark(f,Editor.checkmarkImage);
+f=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},d);"atlas"==e&&b.addCheckmark(f,Editor.checkmarkImage);if("dark"==e||!mxClient.IS_IE&&!mxClient.IS_IE11)f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},d),"dark"==e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");
+c.alert(mxResources.get("restartForChangeRequired"))},d);"sketch"==e&&b.addCheckmark(f,Editor.checkmarkImage)})));p=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b)if(b.constructor==LocalFile&&null!=b.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(d,e){b.invalidFileHandle=null;b.fileHandle=d;b.title=e.name;b.desc=e;c.save(e.name)}),null,c.createFileSystemOptions(b.getTitle()));else{var d=null!=b.getTitle()?b.getTitle():
+this.editorUi.defaultFilename,d=new FilenameDialog(this.editorUi,d,mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&null!=b&&c!=b.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(c,mxUtils.bind(this,function(b){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(b){this.editorUi.handleError(b,null!=b?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):
+null,function(b){if(null!=b&&0<b.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(d.container,340,96,!0,!0);d.init()}}));p.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(null!=b){var d=c.getCopyFilename(b);b.constructor==
+DriveFile?(d=new CreateDialog(c,d,mxUtils.bind(this,function(d,e){"_blank"==e?c.editor.editAsNew(c.getFileData(),d):("download"==e&&(e=App.MODE_GOOGLE),null!=d&&0<d.length&&(e==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(d,mxUtils.bind(this,function(d){b.desc=d;b.save(!1,mxUtils.bind(this,function(){c.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),mxUtils.bind(this,function(b){c.handleError(b)})):c.createFile(d,
+c.getFileData(!0),null,e)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(d.container,420,380,!0,!0),d.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),d)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var d=!1;if(b.getMode()==App.MODE_GOOGLE&&
+null!=b.desc.parents)for(var e=0;e<b.desc.parents.length;e++)if(b.desc.parents[e].isRoot){d=!0;break}c.pickFolder(b.getMode(),mxUtils.bind(this,function(d){c.spinner.spin(document.body,mxResources.get("moving"))&&b.move(d,mxUtils.bind(this,function(b){c.spinner.stop()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),null,!0,d)}}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["publishLink"],c)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+
+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=c.getCurrentFile();null!=b&&b.share()}catch(B){c.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||
+this.addMenuItems(b,["liveImage","-"],d);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],d);navigator.standalone||c.isOffline()||this.addMenuItems(b,["embedIframe"],d);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(b,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),d)})));c.addInsertItem=function(b,d,e,f){("plantUml"!=f||EditorUi.enablePlantUml&&!c.isOffline())&&b.addItem(e,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||
+"plantUml"==f||"mermaid"==f){var b=new ParseDialog(c,e,f);c.showDialog(b.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,g())};var A=function(b,d,e,f){var g=new mxCell(b,new mxGeometry(0,0,d,e),f);g.vertex=!0;b=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([g],!0));g.geometry.x=b.x;g.geometry.y=b.y;k.getModel().beginUpdate();try{g=k.addCell(g),k.fireEvent(new mxEventObject("cellsInserted",
+"cells",[g]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(g);k.setSelectionCell(g);k.container.focus();k.editAfterInsert&&k.startEditing(g);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(g))},0);return g};c.actions.put("insertText",new Action(mxResources.get("text"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),
+null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;c.actions.put("insertRhombus",
+new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
+d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,
+d,["fromText","plantUml","mermaid","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},d,null,g())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},
+d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+
+"...",null,function(){c.pickFile(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickFile(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){c.pickFile(App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+
+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):f&&"function"===
+typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,
+function(){c.showLibraryDialog(null,null,null,null,App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,
+null,null,App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+
+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickLibrary(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},
+d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=
+new FilenameDialog(c,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=b;c.editor.isCorsEnabledForUrl(b)||(d=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(d,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,d.getText(),b))}catch(F){c.handleError(F,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},
+function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d));"1"==urlParams.confLib&&(b.addSeparator(d),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},d))})));this.put("edit",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+p=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var b=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(b);this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var p=this.get("viewPanels"),z=p.funct;p.funct=
+function(b,d){z.apply(this,arguments);c.menus.addMenuItems(b,["tags"],d);c.commentsSupported()&&c.menus.addMenuItems(b,["comments"],d)};this.put("view",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(b,["-","search"],d);if(isLocalStorage||mxClient.IS_CHROMEAPP){var e=this.addMenuItem(b,"scratchpad",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(b,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",b,d);this.addMenuItems(b,"- scrollbars tooltips ruler - grid guides".split(" "),d);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",d);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),d);"1"!=urlParams.sketch&&this.addMenuItems(b,
+["-","fullscreen"],d)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,d){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",b,d),b.addSeparator(d));"1"!=urlParams.embed&&(this.addSubmenu("theme",b,d),b.addSeparator(d));if("undefined"!==typeof MathJax){var e=this.addMenuItem(b,"mathematicalTypesetting",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/math-typesetting")}this.addMenuItems(b,["copyConnect","collapseExpand",
+"-"],d);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(b,["showStartScreen"],d);"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],d);b.addSeparator(d);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(b,"plugins",d);this.addMenuItems(b,["-","editDiagram"],d);Graph.translateDiagram&&this.addMenuItems(b,["diagramLanguage"]);this.addMenuItems(b,["-","configuration"],d);b.addSeparator(d);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function b(b){return{id:b.id,
+isExt:!0,url:b.downloadUrl,title:b.title,imgUrl:b.thumbnailLink,changedBy:b.lastModifyingUserName,lastModifiedOn:b.modifiedDate}}var d=new TemplatesDialog(c,function(b){console.log(arguments)},null,null,null,"user",function(d,e,f){var g=new Date;g.setDate(g.getDate()-7);c.drive.listFiles(null,g,f?!0:!1,function(c){for(var e=[],f=0;f<c.items.length;f++)e.push(b(c.items[f]));d(e)},e)},function(d,e,f,g){c.drive.listFiles(d,null,g?!0:!1,function(c){for(var d=[],f=0;f<c.items.length;f++)d.push(b(c.items[f]));
+e(d)},f)},function(b,d,e){c.drive.getFile(b.id,function(b){d(b.data)},e)},null,function(b){b({Test:[]},1)},!0,!1);c.showDialog(d.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(b,"templates",d))})));this.put("file",new Menu(mxUtils.bind(this,function(b,d){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,d),this.addSubmenu("exportAs",b,d),this.addSubmenu("embed",b,d),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],d),this.addSubmenu("newLibrary",b,d),
+this.addSubmenu("openLibraryFrom",b,d)),c.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],d),this.addMenuItems(b,["-","pageSetup","print","-","rename"],d),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],d):(this.addMenuItems(b,["save"],d),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],d))),"1"!=urlParams.noExitBtn&&this.addMenuItems(b,["exit"],d);else{var e=this.editorUi.getCurrentFile();
+if(null!=e&&e.constructor==DriveFile){e.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],d);this.addMenuItems(b,["save","-","share"],d);var f=this.addMenuItem(b,"synchronize",d);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(f,"https://www.diagrams.net/doc/faq/synchronize");b.addSeparator(d)}else this.addMenuItems(b,["new"],d);this.addSubmenu("openFrom",b,d);isLocalStorage&&this.addSubmenu("openRecent",b,d);null!=e&&e.constructor==DriveFile?this.addMenuItems(b,
+["new","-","rename","makeCopy","moveToFolder"],d):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile&&null==e.fileHandle||(b.addSeparator(d),f=this.addMenuItem(b,"synchronize",d),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(f,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(b,["-","save","saveAs","-"],d),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==e||this.addMenuItems(b,
+["share","-"],d),this.addMenuItems(b,["rename"],d),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):(this.addMenuItems(b,["makeCopy"],d),null!=e&&e.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],d)));b.addSeparator(d);this.addSubmenu("importFrom",b,d);this.addSubmenu("exportAs",b,d);b.addSeparator(d);this.addSubmenu("embed",b,d);this.addSubmenu("publish",b,d);b.addSeparator(d);this.addSubmenu("newLibrary",b,d);this.addSubmenu("openLibraryFrom",
+b,d);c.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],d);null!=e&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));this.addMenuItems(b,["-","pageSetup"],d);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],d);this.addMenuItems(b,["-","close"])}})));b.prototype.execute=function(){var b=this.ui.editor.graph;this.customFonts=
+this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var c=b.extFonts,d=0;null!=c&&d<c.length;d++){var e=document.getElementById("extFont_"+c[d].name);null!=e&&e.parentNode.removeChild(e)}b.extFonts=[];for(d=0;null!=this.previousExtFonts&&d<this.previousExtFonts.length;d++)this.ui.editor.graph.addExtFont(this.previousExtFonts[d].name,this.previousExtFonts[d].url);
+this.previousExtFonts=c};this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,e){for(var f=mxUtils.bind(this,function(f,g,k,l,n){var m=c.editor.graph;l=this.styleChange(d,l||f,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],null,e,function(){"1"!=urlParams["ext-fonts"]?m.setFont(f,g):(document.execCommand("fontname",!1,f),m.addExtFont(f,g));c.fireEvent(new mxEventObject("styleChanged",
+"keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],"cells",[m.cellEditor.getEditingCell()]))},function(){m.updateLabelElements(m.getSelectionCells(),function(b){b.removeAttribute("face");b.style.fontFamily=null;"PRE"==b.nodeName&&m.replaceElement(b,"div")});"1"==urlParams["ext-fonts"]&&m.addExtFont(f,g)});k&&(k=document.createElement("span"),k.className=
+"geSprite geSprite-delete",k.style.cursor="pointer",k.style.display="inline-block",l.firstChild.nextSibling.nextSibling.appendChild(k),mxEvent.addListener(k,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(d){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[f.toLowerCase()];for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==f&&this.customFonts[e].url==g){this.customFonts.splice(e,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var k=
+mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=k&&0<k.length)for(e=0;e<k.length;e++)if(k[e].name==f){k.splice(e,1);break}for(var l=mxUtils.clone(this.customFonts),e=0;e<l.length;e++)if(l[e].name==f){l.splice(e,1);break}e=new b(this.editorUi,k,l);this.editorUi.editor.graph.model.execute(e)}this.editorUi.hideCurrentMenu();mxEvent.consume(d)})));Graph.addFont(f,g);l.firstChild.nextSibling.style.fontFamily=f;null!=n&&l.setAttribute("title",n)}),g={},k=0;k<this.defaultFonts.length;k++){var l=
+this.defaultFonts[k];"string"===typeof l?f(l):null!=l.fontFamily&&null!=l.fontUrl&&(g[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,f(l.fontFamily,l.fontUrl))}d.addSeparator(e);if("1"!=urlParams["ext-fonts"]){for(var l=function(b){var c=encodeURIComponent(b.name)+(null==b.url?"":"@"+encodeURIComponent(b.url));if(!g[c]){for(var d=b.name,e=0;null!=m[d.toLowerCase()];)d=b.name+" ("+ ++e+")";null==n[c]&&(p.push({name:b.name,url:b.url,label:d,title:b.url}),m[d.toLowerCase()]=b,
+n[c]=b)}},n={},m={},p=[],k=0;k<this.customFonts.length;k++)l(this.customFonts[k]);for(var q in Graph.recentCustomFonts)l(Graph.recentCustomFonts[q]);p.sort(function(b,c){return b.label<c.label?-1:b.label>c.label?1:0});if(0<p.length){for(k=0;k<p.length;k++)f(p[k].name,p[k].url,!0,p[k].label,p[k].url);d.addSeparator(e)}d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),e);d.addSeparator(e)}else{q=
+this.editorUi.editor.graph.extFonts;if(null!=q&&0<q.length){for(var l={},t=!1,k=0;k<this.customFonts.length;k++)l[this.customFonts[k].name]=!0;for(k=0;k<q.length;k++)l[q[k].name]||(this.customFonts.push(q[k]),t=!0);t&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)q=this.customFonts[k].name,l=this.customFonts[k].url,f(q,l,!0),this.editorUi.editor.graph.addExtFont(q,l,!0);d.addSeparator(e);
+d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var d=new b(this.editorUi,[],[]);c.editor.graph.model.execute(d)}),e);d.addSeparator(e)}}d.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var b=this.editorUi.editor.graph,c=b.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],d="s",e=null;if("1"!=urlParams["ext-fonts"]&&b.isEditing()){var f=b.getSelectedEditingElement();null!=f&&(f=mxUtils.getCurrentStyle(f),null!=f&&(c=Graph.stripQuotes(f.fontFamily),
+e=Graph.getFontUrl(c,null),null!=e&&(Graph.isGoogleFontUrl(e)?(e=null,d="g"):d="w")))}else f=b.getView().getState(b.getSelectionCell()),null!=f&&(c=f.style[mxConstants.STYLE_FONTFAMILY]||c,"1"!=urlParams["ext-fonts"]?(f=f.style.fontSource,null!=f&&(f=decodeURIComponent(f),Graph.isGoogleFontUrl(f)?d="g":(d="w",e=f))):(d=f.style.FType||d,"w"==d&&(e=this.editorUi.editor.graph.extFonts,f=null,null!=e&&(f=e.find(function(b){return b.name==c})),e=null!=f?f.url:mxResources.get("urlNotFound",null,"URL not found"))));
+null!=e&&e.substring(0,PROXY_URL.length)==PROXY_URL&&(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)));var g=null;document.activeElement==b.cellEditor.textarea&&(g=b.cellEditor.saveSelection());d=new FontDialog(this.editorUi,c,e,d,mxUtils.bind(this,function(c,d,e){null!=g&&(b.cellEditor.restoreSelection(g),g=null);if(null!=c&&0<c.length)if("1"!=urlParams["ext-fonts"]&&b.isEditing())b.setFont(c,d);else{b.getModel().beginUpdate();try{b.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+c),b.setCellStyles("fontSource",null!=d?encodeURIComponent(d):null),b.setCellStyles("FType",null)):(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),"s"!=e&&(b.setCellStyles("FType",e),0==d.indexOf("http://")&&(d=PROXY_URL+"?url="+encodeURIComponent(d)),this.editorUi.editor.graph.addExtFont(c,d)));e=!0;for(var f=0;f<this.customFonts.length;f++)if(this.customFonts[f].name==c){e=!1;break}e&&(this.customFonts.push({name:c,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
+this.customFonts)))}finally{b.getModel().endUpdate()}}}));this.editorUi.showDialog(d.container,380,Editor.enableWebFonts?250:180,!0,!0);d.init()}),e,null,!0)})))}})();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,d){this.ui=b;this.page=e;this.previous=this.name=d}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,d){this.ui=b;this.oldIndex=e;this.newIndex=d}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,d){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=d&&(e.viewState=d,this.neverShown=!1))}
@@ -11825,7 +11831,7 @@ EditorUi.prototype.duplicatePage=function(b,e){var d=null;try{var c=this.editor.
b)+1);c.updateCustomLinks(c.createCellMapping(g,n),[d.root])}}catch(f){this.handleError(f)}return d};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,b,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};
EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
-1),k=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(d){b.isEnabled()?(mxClient.IS_FF&&d.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(d)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(b){k=null;b.stopPropagation();
+1),k=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(d){b.isEnabled()?(mxClient.IS_FF&&d.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(d)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(b){k=null;b.stopPropagation();
b.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null!=k&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=k&&c!=k&&this.movePage(k,c);b.stopPropagation();b.preventDefault()}));e.appendChild(d)})(g,this.createTabForPage(this.pages[g],c,this.pages[g]!=this.currentPage,g+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var f=this.createControlTab(4,"&nbsp;&#10095;");f.style.position="absolute";
f.style.right=this.editor.chromeless?"0px":"29px";f.style.fontSize="13pt";this.tabContainer.appendChild(f);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=l+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(b){e.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,
@@ -11857,10 +11863,10 @@ d,e,n,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.pro
null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function l(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=v.cloneCells([e[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(e[0],
!0),!0);var k=f(b),l=d.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=d&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var n=v.view.getState(b),m=v.view.scale;if(null!=n){var p=mxRectangle.fromRectangle(n);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*m:p.y+=(c?
b.geometry.height+10:-g[1].geometry.height-10)*m;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=e=0;u<q.length;u++){var y=v.model.getTerminal(q[u],!1);if(k==f(y)){var x=v.view.getState(y);y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY())&&mxUtils.intersects(p,x)&&(e=10+Math.max(e,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/m),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/m))}}t?l=0:e=0;for(u=0;u<q.length;u++)if(y=v.model.getTerminal(q[u],!1),k==f(y)&&(x=v.view.getState(y),y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY()))){var B=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&B.push(c);(null==c||d)&&B.push(b);return null==c||d});v.moveCells(B,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function m(b){v.model.beginUpdate();try{var c=
+p.height,x.y+x.height)-Math.max(p.y,x.y))/m))}}t?l=0:e=0;for(u=0;u<q.length;u++)if(y=v.model.getTerminal(q[u],!1),k==f(y)&&(x=v.view.getState(y),y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY()))){var F=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&F.push(c);(null==c||d)&&F.push(b);return null==c||d});v.moveCells(F,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function m(b){v.model.beginUpdate();try{var c=
f(b),d=v.getIncomingTreeEdges(b),e=v.cloneCells([d[0],b]);v.model.setTerminal(d[0],e[1],!1);v.model.setTerminal(e[0],e[1],!0);v.model.setTerminal(e[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var n=b.geometry.width+40,m=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?n=0:c==mxConstants.DIRECTION_NORTH?
(n=0,m=-m):c==mxConstants.DIRECTION_WEST?(n=-n,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);v.moveCells(l,n,m);return v.addCells(e,g)}finally{v.model.endUpdate()}}function p(b,c){v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=f(b);0==e.length&&(e=[v.createEdge(d,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([e[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var n=JSON.parse(l),m;for(m in n)v.setCellStyles(m,n[m],[k[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==n[m]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(ba){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(n=0;n<e.length;n++){var q=v.model.getTerminal(e[n],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,y=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+if(null!=l)try{var n=JSON.parse(l),m;for(m in n)v.setCellStyles(m,n[m],[k[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==n[m]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(qa){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(n=0;n<e.length;n++){var q=v.model.getTerminal(e[n],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,y=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/y-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/y-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/y-u.y+-p.y+10);return v.addCells(k,d)}finally{v.model.endUpdate()}}function q(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
d.y-d.height})}return e}function t(b,c){var d=f(b),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?u.actions.get("selectParent").funct():d==c?(e=v.getOutgoingTreeEdges(b),null!=e&&0<e.length&&v.setSelectionCell(v.model.getTerminal(e[0],!1))):(d=v.getIncomingTreeEdges(b),null!=d&&0<d.length&&(e=q(v.model.getTerminal(d[0],!0),e,b),d=v.view.getState(b),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||
@@ -11873,14 +11879,14 @@ f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return
v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==n.length&&0<k.length){var m=this.cloneCell(k[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var B=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var n=null;this.model.beginUpdate();try{var m=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
!0)){g=v.model.getParent(c[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var y=v.view.getState(m);null!=y&&(d=(y.getCenterX()-u.getCenterX())/v.view.scale,e=(y.getCenterY()-u.getCenterY())/v.view.scale)}}}}n=B.apply(this,arguments);if(null!=n&&null!=c&&n.length==c.length)for(q=0;q<n.length;q++)if(this.model.isEdge(n[q]))b(m)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[q],
!0))&&this.model.setTerminal(n[q],m,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(m)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==v.getIncomingTreeEdges(n[q]).length){p=m;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,n[q])}}finally{this.model.endUpdate()}return n};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
-function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var n=v.getCellGeometry(k[l]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var D={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},G=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var n=v.getCellGeometry(k[l]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var E={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},D=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?m(v.getSelectionCell()):p(v.getSelectionCell()):13==c.which&&(d=l(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
-v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=D[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(t(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(L){u.handleError(L)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var E=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=f(c),y=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?p(c,d):y==x?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};v.getSubtree=function(c){var e=
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=E[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(t(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(J){u.handleError(J)}mxEvent.isConsumed(c)||D.apply(this,arguments)};var G=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=f(c),y=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?p(c,d):y==x?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};v.getSubtree=function(c){var e=
[c];!d(c)&&!b(c)||n(c)||v.traverse(c,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&!n(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(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
-this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.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 H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){H.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=d.apply(this,arguments),e=this.graph;return b.concat([this.addEntry("tree container",
+this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.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 L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){L.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=d.apply(this,arguments),e=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.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 e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=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};');c.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};');
@@ -11904,119 +11910,131 @@ e.className="geTitle";e.innerHTML='<span style="font-size:18px;margin-right:5px;
e.className="geTitle";var g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));e.appendChild(g);c.appendChild(e);mxEvent.addListener(e,"click",b.actions.get("newLibrary").funct);e=document.createElement("div");e.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;";e.className="geTitle";g=document.createElement("span");
g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("openLibrary"));e.appendChild(g);c.appendChild(e);mxEvent.addListener(e,"click",b.actions.get("openLibrary").funct)}else e=d("newLibrary",mxResources.get("newLibrary")),e.style.boxSizing="border-box",e.style.paddingRight="6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="0",e=d("openLibraryFrom",mxResources.get("openLibraryFrom")),e.style.borderLeft="1px solid lightgray",e.style.boxSizing="border-box",e.style.paddingRight=
"6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="50%";c.appendChild(b.sidebar.container);c.style.overflow="hidden";return c});b.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);b.sidebarWindow.window.setVisible(!0);b.getLocalData("sidebar",function(c){b.sidebar.showEntries(c,null,!0)});b.restoreLibraries()}else b.sidebarWindow.window.setVisible(null!=d?d:!b.sidebarWindow.window.isVisible());b.sidebarWindow.window.isVisible()&&b.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||
-"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=function(b,c,d,e,f,g,k){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";k(l);this.window=new mxWindow(c,l,d,e,
-f,g,!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(b,c){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-("1"==urlParams.sketch?3:48)));
-this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(c){null==c&&(c=window.event);return null!=c&&b.isSelectionAllowed(c)}))};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=
+"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(y){}var c=function(b,c,d,e,f,g,k){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";k(l);this.window=
+new mxWindow(c,l,d,e,f,g,!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(b,c){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-("1"==urlParams.sketch?
+3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(c){null==c&&(c=window.event);return null!=c&&b.isSelectionAllowed(c)}))};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(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var k=document.createElement("link");k.setAttribute("rel","stylesheet");k.setAttribute("href",STYLE_PATH+"/dark.css");k.setAttribute("charset","UTF-8");k.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
-function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
-null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&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();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
-StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";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;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";g.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==k.parentNode&&document.getElementsByTagName("head")[0].appendChild(k):null!=k.parentNode&&k.parentNode.removeChild(k)}};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; }":
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);null==urlParams.dark&&(mxSettings.settings.darkMode=b,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var k=document.createElement("link");k.setAttribute("rel","stylesheet");k.setAttribute("href",STYLE_PATH+"/dark.css");k.setAttribute("charset","UTF-8");k.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.defaultPageBackgroundColor=
+"1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";c.loadStylesheet();null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&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();Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";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;g.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==k.parentNode&&document.getElementsByTagName("head")[0].appendChild(k):null!=k.parentNode&&k.parentNode.removeChild(k)}};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 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 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; }html body .geStatus { padding-top:3px !important; }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: '+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
-(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#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()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+(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 g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(g);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=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");n.apply(this,arguments)};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.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){var b=
-document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
-b.appendChild(c)}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,
-"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top=
-"6px"}};var q=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=q.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var t=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
-function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;t.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
-e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
-function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var v=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);v.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;
-EditorUi.prototype.setGraphEnabled=function(b){x.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"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 A=Menus.prototype.init;Menus.prototype.init=function(){A.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.get("tags").label=mxResources.get("tags")+"...";c.actions.get("forkme").visible="1"!=urlParams.sketch;
-c.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){c.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){c.setSketchMode(!Editor.sketchMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=c.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(b){c.setPagesVisible(!Editor.pagesVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.pagesVisible});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=new ParseDialog(c,"Insert from Text");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("formatSql",
-new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){e(c)},null,null,Editor.ctrlKey+"+Shift+K"));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(c)})).shortcut=c.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!c.isOffline()&&
-c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(b.container,620,420,!0,!1);b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=
-this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();c.menus.addSubmenu("extras",b,d,mxResources.get("preferences"));b.addSeparator(d);
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),d):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&c.menus.addMenuItems(b,["-","save"],d),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&c.menus.addMenuItems(b,["saveAndExit"],d),b.addSeparator(d)):(c.menus.addMenuItems(b,["new"],d),c.menus.addSubmenu("openFrom",b,d),isLocalStorage&&this.addSubmenu("openRecent",b,d),"1"!=urlParams.sketch&&(b.addSeparator(d),
-null!=e&&e.constructor==DriveFile&&c.menus.addMenuItems(b,["share"],d),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||c.menus.addMenuItems(b,["synchronize"],d)),b.addSeparator(d),c.menus.addSubmenu("save",b,d));c.menus.addSubmenu("exportAs",b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,["import"],d):c.menus.addSubmenu("importFrom",b,d);"1"!=urlParams.sketch&&(c.menus.addMenuItems(b,["-","outline"],d),c.commentsSupported()&&c.menus.addMenuItems(b,
-["comments"],d));c.menus.addMenuItems(b,["-","findReplace","layers","tags"],d);c.menus.addMenuItems(b,["-","pageSetup","pageScale"],d);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(b,["print"],d);null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(d);c.menus.addSubmenu("help",b,d);"1"==urlParams.embed?c.menus.addMenuItems(b,["-","exit"],d):c.menus.addMenuItems(b,
-["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null!=e&&e.constructor==DriveFile?c.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],d):(c.menus.addMenuItems(b,["save","saveAs","-","rename"],d),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):c.menus.addMenuItems(b,["makeCopy"],d));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==
-e||e.constructor==LocalFile||c.menus.addMenuItems(b,["-","synchronize"],d);c.menus.addMenuItems(b,["-","autosave"],d);null!=e&&e.isRevisionHistorySupported()&&c.menus.addMenuItems(b,["-","revisionHistory"],d)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,d){k.funct(b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(b,["publishLink"],d);b.addSeparator(d);c.menus.addSubmenu("embed",b,d)})));var l=this.get("language");this.put("table",
-new Menu(mxUtils.bind(this,function(b,d){c.menus.addInsertTableCellItem(b,d)})));var n=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,e){n.funct(b,e);this.addMenuItems(b,["editDiagram"],e);"1"==urlParams.sketch&&(b.addSeparator(e),b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},e,null,mxUtils.bind(d,d.isEnabled)),c.addInsertMenuItems(b,e,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,
-function(b,d){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",b,d);null!=l&&c.menus.addSubmenu("language",b,d);c.menus.addSubmenu("units",b,d);b.addSeparator(d);c.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),d);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],d);this.addMenuItems(b,["toggleDarkMode"],d);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],d);
-"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],d);b.addSeparator(d);c.menus.addMenuItem(b,"configuration",d);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(b,"plugins",d);this.addMenuItems(b,["-","fullscreen"],d);b.addSeparator(d)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),d)})));mxUtils.bind(this,function(){var b=this.get("insert"),
-d=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(b,["insertTemplate"],e)):(d.apply(this,arguments),c.menus.addSubmenu("table",b,e),b.addSeparator(e));c.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var m="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,d,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(c,
-e,f);c.showDialog(b.container,620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<m.length;d++)"-"==m[d]?b.addSeparator(c):p(b,c,mxResources.get(m[d])+"...",m[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.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%;";
-c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display=
-"inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));m.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+
-mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle=
-"none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=m.statusContainer?q.insertBefore(k,m.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",
-function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign=
-"top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,m.statusContainer):q.appendChild(d);
-return d}function k(){for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));"1"==urlParams.sketch?Y.style.left=58>N.offsetTop-N.offsetHeight/2?"70px":"10px":(e=b?c("diagram",null,Editor.drawLogoImage):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),m.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),b?Editor.formatImage:null)],b?60:null),e=c("insert",!0,b?K:null),g([e,f(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=d&&(g([pa,W],60),520<=d&&g([ua,
-640<=d?f("",O.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",O,Editor.zoomInImage):null,640<=d?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,Editor.zoomOutImage):null],60)));null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&m.appIconClicked(b)}),null,null));e=m.menus.get("language");null!=
-e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==ia&&(e=u.addMenu("",e.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor="pointer",
-e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),ia=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=ia&&(ia.parentNode.removeChild(ia),ia=null))}z.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom=
-"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==
-urlParams.sketch||1E3<=d)if(b(this,!0),"1"==urlParams.sketch){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(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,p=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(m,q);m.statusContainer=m.createStatusContainer();
-m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var v=m.hideCurrentMenu;m.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=function(){x.apply(this,arguments);var b=m.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=
-b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};m.setStatusText(m.editor.getStatus());q.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-q.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";var R=m.menus.get("viewZoom"),K="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,S="1"==urlParams.sketch?document.createElement("div"):null,N="1"==urlParams.sketch?document.createElement("div"):null,Y="1"==urlParams.sketch?document.createElement("div"):null,Z=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
-(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});m.addListener("darkModeChanged",Z);m.addListener("sketchModeChanged",Z);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var oa=m.hoverIcons.update;m.hoverIcons.update=function(){p.freehand.isDrawing()||
-oa.apply(this,arguments)}}if(null!=p.freehand){var ea=p.freehand.createStyle;p.freehand.createStyle=function(b){return ea.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){N.className="geToolbarContainer";S.className="geToolbarContainer";Y.className="geToolbarContainer";q.className="geToolbarContainer";m.picker=N;var aa=!1;mxEvent.addListener(q,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){aa||(m.statusContainer.style.display=
-"none")});var la=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=
-null!=m.statusContainer.firstChild?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();la(b);var c=m.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',m.statusContainer.style.display="inline-block",aa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",aa=!1)}else m.statusContainer.style.display=
-"inline-block",la(null),aa=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));Q=c("diagram",null,Editor.menuImage);Q.style.boxShadow="none";Q.style.padding="6px";Q.style.margin="0px";Y.appendChild(Q);mxEvent.disableContextMenu(Q);mxEvent.addGestureListeners(Q,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display=
-"none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var 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 fa=!1,ma=mxUtils.bind(this,function(){N.innerHTML="";if(!fa){var b=function(b,c,e){b=f("",b.funct,null,c,b,e);b.style.width="40px";b.style.opacity="0.7";return d(b,null,"pointer")},d=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
-null!=d?d:"default";b.style.margin="2px 0px";N.appendChild(b);mxUtils.br(N);return b};d(m.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");d(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));d(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");d(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;d(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=d(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=m.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
-")",K);Q=c("table",null,Editor.tableImage);Q.style.boxShadow="none";Q.style.opacity="0.7";Q.style.padding="6px";Q.style.margin="0px";Q.style.width="37px";d(Q,null,"pointer");b(m.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}N.appendChild(ba)});mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(N.style,"transform","translate(0, -50%)"),N.style.padding="8px 6px 4px",N.style.top="50%",N.style.bottom="",N.style.height="",ba.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",ba.style.width="40px",ba.style.height="12px",ba.setAttribute("title","Minimize"),fa=!1,ma()):(N.innerHTML="",N.appendChild(ba),mxUtils.setPrefixedStyle(N.style,"transform","translate(0, 0)"),N.style.top="",N.style.bottom="12px",N.style.padding="0px",N.style.height="24px",ba.style.height="24px",ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("insert")),ba.style.width="24px",fa=!0)}));ma();m.addListener("darkModeChanged",
-ma);m.addListener("sketchModeChanged",ma)}else m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=R){var Z=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},O=m.actions.get("zoomIn"),U=m.actions.get("zoomOut"),X=m.actions.get("resetView"),V=m.actions.get("fullscreen");m.actions.get("toggleDarkMode");var ja=m.actions.get("undo"),ga=m.actions.get("redo"),
-pa=f("",ja.funct,null,mxResources.get("undo")+" ("+ja.shortcut+")",ja,Editor.undoImage),W=f("",ga.funct,null,mxResources.get("redo")+" ("+ga.shortcut+")",ga,Editor.redoImage);if(null!=S){var R=function(){da.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length||Editor.pagesVisible?"inline-block":"none"},ca=m.actions.get("delete"),ha=f("",ca.funct,null,mxResources.get("delete"),ca,Editor.trashImage);ha.style.opacity="0.1";Y.appendChild(ha);ca.addListener("stateChanged",function(){ha.style.opacity=
-ca.enabled?"":"0.1"});X=function(){pa.style.display=0<m.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";W.style.display=pa.style.display;pa.style.opacity=ja.enabled?"":"0.1";W.style.opacity=ga.enabled?"":"0.1"};Y.appendChild(pa);Y.appendChild(W);ja.addListener("stateChanged",X);ga.addListener("stateChanged",X);X();null!=urlParams.layers&&(X=m.actions.get("layers"),X=f("",X.funct,null,mxResources.get("layers"),X,Editor.layersImage),X.style.opacity="0.4",S.appendChild(X));null!=
-urlParams.tags&&(X=m.actions.get("tags"),X=f("",X.funct,null,mxResources.get("tags"),X,Editor.tagsImage),X.style.opacity="0.4",S.appendChild(X));X=m.actions.get("outline");X=f("",X.funct,null,mxResources.get("outline"),X,Editor.outlineImage);S.appendChild(X);X=f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",U,Editor.zoomOutImage);S.appendChild(X);var Q=document.createElement("div");Q.innerHTML="100%";Q.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
-" (Enter)");Q.style.display="inline-block";Q.style.cursor="pointer";Q.style.textAlign="center";Q.style.whiteSpace="nowrap";Q.style.paddingRight="10px";Q.style.textDecoration="none";Q.style.verticalAlign="top";Q.style.padding="6px 0";Q.style.fontSize="14px";Q.style.width="40px";Q.style.opacity="0.4";S.appendChild(Q);mxEvent.addListener(Q,"click",Z);Z=f("",O.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",O,Editor.zoomInImage);S.appendChild(Z);var da=this.createPageMenuTab(!1);
-da.style.display="none";da.style.position="";da.style.marginLeft="";da.style.top="";da.style.left="";da.style.height="100%";da.style.lineHeight="";da.style.borderStyle="none";da.style.padding="3px 0";da.style.margin="0px";da.style.background="";da.style.border="";da.style.boxShadow="none";da.style.verticalAlign="top";da.firstChild.style.height="100%";da.firstChild.style.opacity="0.6";da.firstChild.style.margin="0px";S.appendChild(da);m.addListener("fileDescriptorChanged",R);m.addListener("pagesVisibleChanged",
-R);R();m.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;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;";Y.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;";
-S.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(Y);A.appendChild(S);N.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;";A.appendChild(N);window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else{f("",V.funct,null,mxResources.get("fullscreen"),V,Editor.fullscreenImage);var ua=f("",Z,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",X,Editor.zoomFitImage);q.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";Q=u.addMenu("100%",R.funct);Q.setAttribute("title",mxResources.get("zoom")+
-" (Alt+Mousewheel)");Q.style.whiteSpace="nowrap";Q.style.paddingRight="10px";Q.style.textDecoration="none";Q.style.textDecoration="none";Q.style.overflow="hidden";Q.style.visibility="hidden";Q.style.textAlign="center";Q.style.cursor="pointer";Q.style.height=parseInt(m.tabContainerHeight)-1+"px";Q.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px";Q.style.position="absolute";Q.style.display="block";Q.style.fontSize="12px";Q.style.width="59px";Q.style.right="0px";Q.style.bottom="0px";Q.style.backgroundImage=
-"url("+mxWindow.prototype.minimizeImage+")";Q.style.backgroundPosition="right 6px center";Q.style.backgroundRepeat="no-repeat";A.appendChild(Q)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);m.editor.addListener("resetGraphView",c);m.editor.addListener("pageSelected",c)})(Q);var ka=m.setGraphEnabled;m.setGraphEnabled=function(){ka.apply(this,arguments);null!=this.tabContainer&&(Q.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);A.appendChild(m.diagramContainer);l.appendChild(A);m.updateTabContainer();null==S&&A.appendChild(m.tabContainer);var ia=null;k();mxEvent.addListener(window,"resize",function(){k();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();
-null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(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)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,n){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],A=[],z=0;z<this.states.length;z++){var y=this.states[z];y instanceof mxCellState&&(n||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
-y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&A.push(y))}var B=0,C=0,D=y=0,G=0,E=0,F=0,I=0,H=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var J=!1,z=t==x[0],u=t==x[x.length-1];if(!z&&!u)for(z=1;z<x.length-1;z++)if(t==x[z]){u=x[z-1];z=x[z+1];y=C=D=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<x.length-1;z++){var u=x[z],M=x[z+1],P=t==u||t==M,M=M.y-u.y-u.height,J=J|t==u;if(0==C&&
-0==B)C=M,B=1;else if(Math.abs(C-M)<=(P||1==z&&J?v:0))B+=1;else if(1<B&&J){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!J)B=0,y=C=0!=D?D:0,x.splice(0,0==z?1:z),z=-1;else break;0!=y||P||(C=y=M)}3==x.length&&x[1]==t&&(y=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});J=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];F=E=I=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];M=A[z+1];P=t==u||t==M;M=M.x-u.x-u.width;J|=t==
-u;if(0==E&&0==G)E=M,G=1;else if(Math.abs(E-M)<=(P||1==z&&J?v:0))G+=1;else if(1<G&&J){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!J)G=0,F=E=0!=I?I:0,A.splice(0,0==z?1:z),z=-1;else break;0!=F||P||(E=F=M)}3==A.length&&A[1]==t&&(F=0)}v=function(b,c,d,e){var f=[],g;e?(e=H,g=0):(e=0,g=H);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};E=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<G&&G==A.length-1){G=[];I=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;J=A[z].y+A[z].height;if(0<F)for(z=0;z<A.length-1;z++)u=
-A[z],M=A[z+1],t==u?(g=M.x-u.width-F,k.push(new mxPoint(g+u.width+H,J)),k.push(new mxPoint(M.x-H,J))):t==M?(k.push(new mxPoint(u.x+u.width+H,J)),g=u.x+u.width+F,k.push(new mxPoint(g-H,J))):(k.push(new mxPoint(u.x+u.width+H,J)),k.push(new mxPoint(M.x-H,J)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+H,J)),k.push(new mxPoint(g-H,J)),k.push(new mxPoint(g+t.width+H,J)),k.push(new mxPoint(z.x-H,J));for(z=0;z<k.length;z+=2)A=k[z],F=k[z+1],A=v(A,F,null!=I?
-I[z/2]:null),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=k.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrHor=G;g-=c.x;k=!0}else E(!0);if(1<B&&B==x.length-1){G=[];I=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;B=x[z].x+x[z].width;if(0<y)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-y,p.push(new mxPoint(B,f+u.height+H)),p.push(new mxPoint(B,M.y-H))):t==M?(p.push(new mxPoint(B,u.y+u.height+H)),f=u.y+u.height+y,p.push(new mxPoint(B,f-H))):(p.push(new mxPoint(B,u.y+
-u.height+H)),p.push(new mxPoint(B,M.y-H)));else u=x[0],z=x[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+H)),p.push(new mxPoint(B,f-H)),p.push(new mxPoint(B,f+t.height+H)),p.push(new mxPoint(B,z.y-H));for(z=0;z<p.length;z+=2)A=p[z],F=p[z+1],A=v(A,F,null!=I?I[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=p.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrVer=G;f-=c.y;p=!0}else E(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
-c,t,e,n),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;E(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var n=0;n<c.length;n++)c[n].node.style.visibility=b?"visible":"hidden";if(null!=
+b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.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 b=document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className=
+"geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var q=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=q.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
+e.x+=d.x-16;e.y+=d.y;return e};var t=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;t.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-",
+"lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||
+mxClient.IS_IE11)||this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
+var v=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);v.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){x.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"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 A=Menus.prototype.init;Menus.prototype.init=function(){A.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";
+c.actions.get("tags").label=mxResources.get("tags")+"...";c.actions.get("forkme").visible="1"!=urlParams.sketch;c.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){c.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){c.setSketchMode(!Editor.sketchMode)}));
+f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=c.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(b){c.setPagesVisible(!Editor.pagesVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.pagesVisible});c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
+new ParseDialog(c,"Insert from Text");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){e(c)},null,null,Editor.ctrlKey+"+Shift+K"));c.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(c)})).shortcut=c.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(b.container,620,420,!0,!1);
+b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,
+d){var e=c.getCurrentFile();c.menus.addSubmenu("extras",b,d,mxResources.get("preferences"));b.addSeparator(d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),d):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(b,["-","save"],d),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&c.menus.addMenuItems(b,["saveAndExit"],d),b.addSeparator(d)):(c.menus.addMenuItems(b,
+["new"],d),c.menus.addSubmenu("openFrom",b,d),isLocalStorage&&this.addSubmenu("openRecent",b,d),"1"!=urlParams.sketch&&(b.addSeparator(d),null!=e&&e.constructor==DriveFile&&c.menus.addMenuItems(b,["share"],d),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||c.menus.addMenuItems(b,["synchronize"],d)),b.addSeparator(d),c.menus.addSubmenu("save",b,d));c.menus.addSubmenu("exportAs",b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,["import"],d):
+c.menus.addSubmenu("importFrom",b,d);"1"!=urlParams.sketch&&(c.menus.addMenuItems(b,["-","outline"],d),c.commentsSupported()&&c.menus.addMenuItems(b,["comments"],d));c.menus.addMenuItems(b,["-","findReplace","layers","tags"],d);c.menus.addMenuItems(b,["-","pageSetup","pageScale"],d);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(b,["print"],d);null!=e&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||
+this.addMenuItems(b,["-","properties"]));b.addSeparator(d);c.menus.addSubmenu("help",b,d);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&c.menus.addMenuItems(b,["-","exit"],d):c.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null!=e&&e.constructor==DriveFile?c.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],d):(c.menus.addMenuItems(b,["save","saveAs","-","rename"],d),c.isOfflineApp()?navigator.onLine&&
+"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):c.menus.addMenuItems(b,["makeCopy"],d));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||c.menus.addMenuItems(b,["-","synchronize"],d);c.menus.addMenuItems(b,["-","autosave"],d);null!=e&&e.isRevisionHistorySupported()&&c.menus.addMenuItems(b,["-","revisionHistory"],d)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,d){k.funct(b,
+d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(b,["publishLink"],d);b.addSeparator(d);c.menus.addSubmenu("embed",b,d)})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,d){c.menus.addInsertTableCellItem(b,d)})));var n=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,e){n.funct(b,e);this.addMenuItems(b,["editDiagram"],e);"1"==urlParams.sketch&&(b.addSeparator(e),b.addItem(mxResources.get("csv")+"...",null,
+function(){c.showImportCsvDialog()},e,null,mxUtils.bind(d,d.isEnabled)),c.addInsertMenuItems(b,e,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,d){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",b,d);null!=l&&c.menus.addSubmenu("language",b,d);c.menus.addSubmenu("units",b,d);b.addSeparator(d);c.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),d);"1"!=urlParams.embedInline&&("1"==urlParams.sketch&&
+this.addMenuItems(b,["toggleSketchMode"],d),this.addMenuItems(b,["toggleDarkMode"],d),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],d),"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],d));b.addSeparator(d);c.menus.addMenuItem(b,"configuration",d);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(b,"plugins",d);this.addMenuItems(b,["-","fullscreen"],d);b.addSeparator(d)})));this.put("insertAdvanced",
+new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),d)})));mxUtils.bind(this,function(){var b=this.get("insert"),d=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(b,["insertTemplate"],e)):(d.apply(this,arguments),c.menus.addSubmenu("table",b,e),b.addSeparator(e));c.menus.addMenuItems(b,["-",
+"toggleShapes"],e)}})();var m="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,d,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(c,e,f);c.showDialog(b.container,620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<m.length;d++)"-"==m[d]?b.addSeparator(c):p(b,c,mxResources.get(m[d])+"...",m[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=
+this.editor.graph,d=document.createElement("div");d.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%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var z=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));m.menus.menuCreated(e,
+f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=m.statusContainer?q.insertBefore(k,m.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat=
+"no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled",
+"disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding=
+"10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,m.statusContainer):q.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(X.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px");else{for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);
+b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));e=b?c("diagram",null,Editor.drawLogoImage):null;null!=e&&(k=e);g([k,f(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),m.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+
+")",m.actions.get("image"),b?Editor.formatImage:null)],b?60:null);e=c("insert",!0,b?K:null);g([e,f(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),b?Editor.trashImage:null)],b?60:null);411<=d&&(g([W,ba],60),520<=d&&g([ma,640<=d?f("",V.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",V,Editor.zoomInImage):null,640<=d?f("",fa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",fa,Editor.zoomOutImage):null],60))}null!=
+k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&m.appIconClicked(b)}),null,null));e=m.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==ha&&(e=u.addMenu("",e.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage=
+"url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor="pointer",e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),ha=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=ha&&(ha.parentNode.removeChild(ha),ha=null))}z.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 l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);
+"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=d)if(b(this,!0),"1"==urlParams.sketch){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(b){mxEvent.getSource(b)==
+this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,p=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(m,q);m.statusContainer=m.createStatusContainer();m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop=
+"7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var v=m.hideCurrentMenu;m.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=function(){x.apply(this,arguments);var b=m.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");
+c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};m.setStatusText(m.editor.getStatus());q.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className=
+"geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var U=m.menus.get("viewZoom"),K="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?
+document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null,Z=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});m.addListener("darkModeChanged",
+Z);m.addListener("sketchModeChanged",Z);var ka=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)X.style.left="10px",X.style.top="10px",O.style.left="10px",O.style.top="60px",N.style.top="10px",N.style.right="12px",N.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom=
+"0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height="";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background="transparent";m.diagramContainer.removeAttribute("data-bounds");var c=p.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom=
+"";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}X.style.left=m.diagramContainer.offsetLeft+"px";X.style.top=m.diagramContainer.offsetTop-X.offsetHeight-4+"px";O.style.display="";O.style.left=m.diagramContainer.offsetLeft-O.offsetWidth-4+"px";O.style.top=m.diagramContainer.offsetTop+"px";N.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-N.offsetWidth+
+"px";N.style.top=X.style.top;N.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-
+m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=m.bottomResizer.style.visibility;q.style.display="none";X.style.visibility="";N.style.visibility=""}),Z=mxUtils.bind(this,function(){this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ka()});m.addListener("inlineFullscreenChanged",Z);m.addListener("editInlineStart",Z);"1"==urlParams.embedInline&&
+m.addListener("darkModeChanged",Z);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";X.style.visibility="hidden";N.style.visibility="hidden";O.style.display="none"}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&
+!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var aa=m.hoverIcons.update;m.hoverIcons.update=function(){p.freehand.isDrawing()||aa.apply(this,arguments)}}if(null!=p.freehand){var ca=p.freehand.createStyle;p.freehand.createStyle=function(b){return ca.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";N.className="geToolbarContainer";X.className="geToolbarContainer";
+q.className="geToolbarContainer";m.picker=O;var la=!1;mxEvent.addListener(q,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){la||(m.statusContainer.style.display="none")});var qa=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed?(q.style.visibility=14>q.clientWidth?"hidden":"",m.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();qa(b);var c=m.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?
+(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',m.statusContainer.style.display="inline-block",la=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",la=!1)}else m.statusContainer.style.display="inline-block",qa(null),la=!0;q.style.visibility=12<q.clientWidth?"":"hidden"}))):m.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.style.visibility=16<q.clientWidth?"":"hidden"}));S=c("diagram",
+null,Editor.menuImage);S.style.boxShadow="none";S.style.padding="6px";S.style.margin="0px";X.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";m.statusContainer.style.margin="0px";m.statusContainer.style.padding=
+"6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var oa=!1,R=mxUtils.bind(this,function(){O.innerHTML="";if(!oa){var b=function(b,c,e){b=f("",b.funct,null,c,b,e);b.style.width="40px";b.style.opacity="0.7";return d(b,null,"pointer")},d=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};d(m.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");d(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));d(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");d(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);
+b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;d(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=d(m.sidebar.createEdgeTemplateFromCells([b],
+b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=m.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+")",K);S=c("table",null,Editor.tableImage);S.style.boxShadow="none";S.style.opacity="0.7";S.style.padding="6px";S.style.margin=
+"0px";S.style.width="37px";d(S,null,"pointer");b(m.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}"1"!=urlParams.embedInline&&O.appendChild(Y)});mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){oa?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Y.style.width="40px",Y.style.height="12px",
+Y.setAttribute("title","Minimize"),oa=!1,R()):(O.innerHTML="",O.appendChild(Y),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",O.style.padding="0px",O.style.height="24px",Y.style.height="24px",Y.style.backgroundImage="url("+Editor.plusImage+")",Y.setAttribute("title",mxResources.get("insert")),Y.style.width="24px",oa=!0)}));R();m.addListener("darkModeChanged",R);m.addListener("sketchModeChanged",R)}else m.editor.addListener("statusChanged",mxUtils.bind(this,
+function(){m.setStatusText(m.editor.getStatus())}));if(null!=U){var Z=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},V=m.actions.get("zoomIn"),fa=m.actions.get("zoomOut"),Q=m.actions.get("resetView"),ja=m.actions.get("fullscreen");m.actions.get("toggleDarkMode");var ea=m.actions.get("undo"),ra=m.actions.get("redo"),W=f("",ea.funct,null,mxResources.get("undo")+" ("+ea.shortcut+")",ea,Editor.undoImage),ba=f("",ra.funct,
+null,mxResources.get("redo")+" ("+ra.shortcut+")",ra,Editor.redoImage),ja=f("",ja.funct,null,mxResources.get("fullscreen"),ja,Editor.fullscreenImage);if(null!=N){U=function(){ga.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length||Editor.pagesVisible?"inline-block":"none"};ja.parentNode.removeChild(ja);var da=m.actions.get("delete"),ia=f("",da.funct,null,mxResources.get("delete"),da,Editor.trashImage);ia.style.opacity="0.1";X.appendChild(ia);da.addListener("stateChanged",function(){ia.style.opacity=
+da.enabled?"":"0.1"});Q=function(){W.style.display=0<m.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ba.style.display=W.style.display;W.style.opacity=ea.enabled?"":"0.1";ba.style.opacity=ra.enabled?"":"0.1"};X.appendChild(W);X.appendChild(ba);ea.addListener("stateChanged",Q);ra.addListener("stateChanged",Q);Q();null!=urlParams.layers&&(Q=m.actions.get("layers"),Q=f("",Q.funct,null,mxResources.get("layers"),Q,Editor.layersImage),Q.style.opacity="0.4",N.appendChild(Q));null!=
+urlParams.tags&&(Q=m.actions.get("tags"),Q=f("",Q.funct,null,mxResources.get("tags"),Q,Editor.tagsImage),Q.style.opacity="0.4",N.appendChild(Q));Q=m.actions.get("outline");Q=f("",Q.funct,null,mxResources.get("outline"),Q,Editor.outlineImage);N.appendChild(Q);Q=f("",fa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",fa,Editor.zoomOutImage);N.appendChild(Q);var S=document.createElement("div");S.innerHTML="100%";S.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
+" (Enter)");S.style.display="inline-block";S.style.cursor="pointer";S.style.textAlign="center";S.style.whiteSpace="nowrap";S.style.paddingRight="10px";S.style.textDecoration="none";S.style.verticalAlign="top";S.style.padding="6px 0";S.style.fontSize="14px";S.style.width="40px";S.style.opacity="0.4";N.appendChild(S);mxEvent.addListener(S,"click",Z);Z=f("",V.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",V,Editor.zoomInImage);N.appendChild(Z);"1"==urlParams.embedInline&&
+N.appendChild(ja);var ga=this.createPageMenuTab(!1);ga.style.display="none";ga.style.position="";ga.style.marginLeft="";ga.style.top="";ga.style.left="";ga.style.height="100%";ga.style.lineHeight="";ga.style.borderStyle="none";ga.style.padding="3px 0";ga.style.margin="0px";ga.style.background="";ga.style.border="";ga.style.boxShadow="none";ga.style.verticalAlign="top";ga.firstChild.style.height="100%";ga.firstChild.style.opacity="0.6";ga.firstChild.style.margin="0px";N.appendChild(ga);m.addListener("fileDescriptorChanged",
+U);m.addListener("pagesVisibleChanged",U);U();m.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;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;";X.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;";
+N.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(X);A.appendChild(N);O.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;";A.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else{var ma=f("",Z,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);q.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";S=u.addMenu("100%",U.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.style.whiteSpace="nowrap";S.style.paddingRight=
+"10px";S.style.textDecoration="none";S.style.textDecoration="none";S.style.overflow="hidden";S.style.visibility="hidden";S.style.textAlign="center";S.style.cursor="pointer";S.style.height=parseInt(m.tabContainerHeight)-1+"px";S.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px";S.style.position="absolute";S.style.display="block";S.style.fontSize="12px";S.style.width="59px";S.style.right="0px";S.style.bottom="0px";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition=
+"right 6px center";S.style.backgroundRepeat="no-repeat";A.appendChild(S)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);m.editor.addListener("resetGraphView",c);m.editor.addListener("pageSelected",c)})(S);var pa=m.setGraphEnabled;m.setGraphEnabled=function(){pa.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom=
+"hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);A.appendChild(m.diagramContainer);l.appendChild(A);m.updateTabContainer();null==N&&A.appendChild(m.tabContainer);var ha=null;k();mxEvent.addListener(window,"resize",function(){k();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();
+null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";O.style.transform="";mxEvent.addGestureListeners(m.diagramContainer.parentNode,function(b){mxEvent.getSource(b)==m.diagramContainer.parentNode&&m.sendEmbeddedSvgExport()});l=document.createElement("div");l.style.position="absolute";l.style.width=
+"10px";l.style.height="10px";l.style.borderRadius="5px";l.style.border="1px solid gray";l.style.background="#ffffff";l.style.cursor="row-resize";m.diagramContainer.parentNode.appendChild(l);m.bottomResizer=l;var sa=null,na=null,ta=null,va=null;mxEvent.addGestureListeners(l,function(b){va=parseInt(m.diagramContainer.style.height);na=mxEvent.getClientY(b);p.popupMenuHandler.hideMenu();mxEvent.consume(b)});l=l.cloneNode(!1);l.style.cursor="col-resize";m.diagramContainer.parentNode.appendChild(l);m.rightResizer=
+l;mxEvent.addGestureListeners(l,function(b){ta=parseInt(m.diagramContainer.style.width);sa=mxEvent.getClientX(b);p.popupMenuHandler.hideMenu();mxEvent.consume(b)});mxEvent.addGestureListeners(document.body,null,function(b){var c=!1;null!=sa&&(m.diagramContainer.style.width=Math.max(20,ta+mxEvent.getClientX(b)-sa)+"px",c=!0);null!=na&&(m.diagramContainer.style.height=Math.max(20,va+mxEvent.getClientY(b)-na)+"px",c=!0);c&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,
+rect:m.diagramContainer.getBoundingClientRect()}),"*"),m.fireEvent(new mxEventObject("editInlineStart")),m.refresh())},function(b){null==sa&&null==na||mxEvent.consume(b);na=sa=null});p.defaultPageBackgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";X.style.visibility="hidden";N.style.visibility="hidden";O.style.display="none"}"1"==urlParams.prefetchFonts&&
+m.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)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,n){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],A=[],z=0;z<this.states.length;z++){var y=this.states[z];y instanceof mxCellState&&(n||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
+y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&A.push(y))}var B=0,C=0,E=y=0,D=0,G=0,F=0,I=0,L=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var H=!1,z=t==x[0],u=t==x[x.length-1];if(!z&&!u)for(z=1;z<x.length-1;z++)if(t==x[z]){u=x[z-1];z=x[z+1];y=C=E=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<x.length-1;z++){var u=x[z],M=x[z+1],T=t==u||t==M,M=M.y-u.y-u.height,H=H|t==u;if(0==C&&
+0==B)C=M,B=1;else if(Math.abs(C-M)<=(T||1==z&&H?v:0))B+=1;else if(1<B&&H){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!H)B=0,y=C=0!=E?E:0,x.splice(0,0==z?1:z),z=-1;else break;0!=y||T||(C=y=M)}3==x.length&&x[1]==t&&(y=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});H=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];F=G=I=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];M=A[z+1];T=t==u||t==M;M=M.x-u.x-u.width;H|=t==
+u;if(0==G&&0==D)G=M,D=1;else if(Math.abs(G-M)<=(T||1==z&&H?v:0))D+=1;else if(1<D&&H){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!H)D=0,F=G=0!=I?I:0,A.splice(0,0==z?1:z),z=-1;else break;0!=F||T||(G=F=M)}3==A.length&&A[1]==t&&(F=0)}v=function(b,c,d,e){var f=[],g;e?(e=L,g=0):(e=0,g=L);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};G=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<D&&D==A.length-1){D=[];I=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;H=A[z].y+A[z].height;if(0<F)for(z=0;z<A.length-1;z++)u=
+A[z],M=A[z+1],t==u?(g=M.x-u.width-F,k.push(new mxPoint(g+u.width+L,H)),k.push(new mxPoint(M.x-L,H))):t==M?(k.push(new mxPoint(u.x+u.width+L,H)),g=u.x+u.width+F,k.push(new mxPoint(g-L,H))):(k.push(new mxPoint(u.x+u.width+L,H)),k.push(new mxPoint(M.x-L,H)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+L,H)),k.push(new mxPoint(g-L,H)),k.push(new mxPoint(g+t.width+L,H)),k.push(new mxPoint(z.x-L,H));for(z=0;z<k.length;z+=2)A=k[z],F=k[z+1],A=v(A,F,null!=I?
+I[z/2]:null),A.node.style.visibility="visible",A.redraw(),D.push(A);for(z=k.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrHor=D;g-=c.x;k=!0}else G(!0);if(1<B&&B==x.length-1){D=[];I=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;B=x[z].x+x[z].width;if(0<y)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-y,p.push(new mxPoint(B,f+u.height+L)),p.push(new mxPoint(B,M.y-L))):t==M?(p.push(new mxPoint(B,u.y+u.height+L)),f=u.y+u.height+y,p.push(new mxPoint(B,f-L))):(p.push(new mxPoint(B,u.y+
+u.height+L)),p.push(new mxPoint(B,M.y-L)));else u=x[0],z=x[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+L)),p.push(new mxPoint(B,f-L)),p.push(new mxPoint(B,f+t.height+L)),p.push(new mxPoint(B,z.y-L));for(z=0;z<p.length;z+=2)A=p[z],F=p[z+1],A=v(A,F,null!=I?I[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),D.push(A);for(z=p.length/2;null!=I&&z<I.length;z++)I[z].destroy();q.guidesArrVer=D;f-=c.y;p=!0}else G(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
+c,t,e,n),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;G(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var n=0;n<c.length;n++)c[n].node.style.visibility=b?"visible":"hidden";if(null!=
d)for(n=0;n<d.length;n++)d[n].node.style.visibility=b?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var b=this.guidesArrVer,e=this.guidesArrHor;if(null!=b){for(var g=0;g<b.length;g++)b[g].destroy();this.guidesArrVer=null}if(null!=e){for(g=0;g<e.length;g++)e[g].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,d,c){function k(){var c=b.diagramContainer;q.style.top=c.offsetTop-l+"px";q.style.left=c.offsetLeft-l+"px";q.style.width=(d?0:c.offsetWidth)+l+"px";q.style.height=(d?c.offsetHeight:0)+l+"px"}function g(b,c,d){if(null!=n)return b;var e;return function(){var f=this,g=arguments,k=d&&!e;clearTimeout(e);e=setTimeout(function(){e=null;d||b.apply(f,g)},c);k&&b.apply(f,g)}}var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,m=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?{bkgClr:"#202020",
-outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=function(c){m.editorUiRefresh.apply(b,
-arguments);k()};k();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var x=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),u.rotate(-Math.PI/2),u.fillText(g,0,0),
-u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,n,q;switch(m.unit){case mxConstants.POINTS:k=
-q=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:q=20;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(m.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:
-t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(z=Math.round((f-e)/b/y),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=m.formatText(g+z*y)+"");d?x(l-n[Math.abs(z)%q],f,l,f,A):x(f,l-n[Math.abs(z)%q],f,l,A)}u.lineWidth=1;x(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,y=function(){null!=
-n?(null!=f&&f(z),z=n(A)):A()};this.drawRuler=y;this.sizeListener=e=g(function(){var b=v.container;d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",y())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=g(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;m.lastScroll!=b&&(m.lastScroll=b,y())},10);this.unitListener=function(b,c){m.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,
-e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,
-m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3)}catch(K){}g=m.origGuideMove.apply(this,arguments);try{var k,n,q,t,v,y,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(n=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=n+b.height/2,t=l/2,A=n+b.height,z=0,q=u.getImageData(k,n-1,l,3),x(k,n,l,n),n--,y=u.getImageData(t,v-1,l,3),x(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),x(z,A,l,A),A--):
-(n=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,n,3,l),x(k,n,k,l),k--,y=u.getImageData(t-1,v,3,l),x(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),x(z,A,z,l),z--);if(null==m.guidePart||m.guidePart.x1!=k||m.guidePart.y1!=n)m.guidePart={imgData1:q,x1:k,y1:n,imgData2:y,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(K){}}else g=m.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=
-m.origGuideDestroy.apply(this,arguments);if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3),m.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
-mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
+f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,m=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?
+{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=
+function(c){m.editorUiRefresh.apply(b,arguments);k()};k();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var x=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),
+u.rotate(-Math.PI/2),u.fillText(g,0,0),u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:
+g.x*v.pageFormat.width);var k,n,q;switch(m.unit){case mxConstants.POINTS:k=q=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:q=20;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(m.unit==mxConstants.MILLIMETERS?
+2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(z=Math.round((f-e)/b/y),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=m.formatText(g+z*y)+"");d?x(l-n[Math.abs(z)%q],f,l,f,A):x(f,l-n[Math.abs(z)%q],f,l,A)}u.lineWidth=1;x(d?0:l,d?l:
+0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,y=function(){null!=n?(null!=f&&f(z),z=n(A)):A()};this.drawRuler=y;this.sizeListener=e=g(function(){var b=v.container;d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",y())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=g(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;m.lastScroll!=b&&(m.lastScroll=b,y())},10);this.unitListener=
+function(b,c){m.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&
+4<b.width){if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3)}catch(K){}g=m.origGuideMove.apply(this,arguments);try{var k,n,q,t,v,y,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(n=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=n+b.height/2,t=l/2,A=n+b.height,z=0,q=u.getImageData(k,n-1,l,3),x(k,n,l,n),n--,
+y=u.getImageData(t,v-1,l,3),x(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),x(z,A,l,A),A--):(n=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,n,3,l),x(k,n,k,l),k--,y=u.getImageData(t-1,v,3,l),x(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),x(z,A,z,l),z--);if(null==m.guidePart||m.guidePart.x1!=k||m.guidePart.y1!=n)m.guidePart={imgData1:q,x1:k,y1:n,imgData2:y,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(K){}}else g=m.origGuideMove.apply(this,arguments);return g};
+this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=m.origGuideDestroy.apply(this,arguments);if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3),m.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var d=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return d};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);var c=mxUtils.bind(this,function(c){var d=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
@@ -12029,6 +12047,6 @@ x=0,p=0;p<n.length;p++){var y=n[p];if(null==y){var y=!1,x=n[x],z=n[p-1];!l&&m&&(
Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,g/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<k.length;p++)k[p].parentNode.removeChild(k[p]);c=null;k=[];n=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var y=new mxCell;y.edge=!0;b.addMouseListener({mouseDown:mxUtils.bind(this,function(d,k){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var l=k.getEvent();if(v&&!mxEvent.isPopupTrigger(l)&&!mxEvent.isMultiTouchEvent(l)){var m=b.getCurrentCellStyle(y),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg",
"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",m));u=[];l=B(l);C(l);g="M"+l.x+" "+l.y;n.push(l);f=[];c.setAttribute("d",
-g);e.appendChild(c);k.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var k=e.getEvent(),k=B(k);C(k);var l=D(0);if(l){g+=" L"+l.x+" "+l.y;n.push(l);var m="";f=[];for(var p=2;p<u.length;p+=2)l=D(p),m+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",g+m)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(k.x-l.x,k.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
-(z(e.getEvent()),e.consume())})});var B=function(c){return mxUtils.convertPoint(b.container,mxEvent.getClientX(c),mxEvent.getClientY(c))},C=function(b){for(u.push(b);u.length>d;)u.shift()},D=function(b){var c=u.length;if(1===c%2||c>=d){var e=0,f=0,g,k=0;for(g=b;g<c;g++)k++,b=u[g],e+=b.x,f+=b.y;return{x:e/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
+g);e.appendChild(c);k.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var k=e.getEvent(),k=B(k);C(k);var l=E(0);if(l){g+=" L"+l.x+" "+l.y;n.push(l);var m="";f=[];for(var p=2;p<u.length;p+=2)l=E(p),m+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",g+m)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(k.x-l.x,k.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
+(z(e.getEvent()),e.consume())})});var B=function(c){return mxUtils.convertPoint(b.container,mxEvent.getClientX(c),mxEvent.getClientY(c))},C=function(b){for(u.push(b);u.length>d;)u.shift()},E=function(b){var c=u.length;if(1===c%2||c>=d){var e=0,f=0,g,k=0;for(g=b;g<c;g++)k++,b=u[g],e+=b.x,f+=b.y;return{x:e/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 4fa34295..0eb9b77b 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -1049,7 +1049,7 @@ App.main = function(callback, createUi)
if (mxSettings.settings != null)
{
document.body.style.backgroundColor = (uiTheme == 'dark' ||
- mxSettings.settings.darkMode) ? '#2a2a2a' : '#ffffff';
+ mxSettings.settings.darkMode) ? Editor.darkColor : '#ffffff';
if (mxSettings.settings.autosaveDelay != null)
{
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 779237de..8fca47ea 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -9076,7 +9076,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
label.style.bottom = '-18px';
label.style.left = '10px';
label.style.right = '10px';
- label.style.backgroundColor = Editor.isDarkMode() ? '#2a2a2a' : '#ffffff';
+ label.style.backgroundColor = Editor.isDarkMode() ? Editor.darkColor : '#ffffff';
label.style.overflow = 'hidden';
label.style.textAlign = 'center';
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 8895cd83..423527ee 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -922,7 +922,8 @@
if (fillStyle == 'auto')
{
- var bg = (this.shape.state != null) ? this.shape.state.view.graph.defaultPageBackgroundColor : '#ffffff';
+ var bg = (this.shape.state != null && this.shape.state.view.graph.defaultPageBackgroundColor != 'transparent') ?
+ this.shape.state.view.graph.defaultPageBackgroundColor : (Editor.isDarkMode() ? Editor.darkColor : '#ffffff');
fillStyle = (style.fill != null && (gradient != null || (bg != null &&
style.fill.toLowerCase() == bg.toLowerCase()))) ? 'solid' : defs['fillStyle']
@@ -1224,7 +1225,8 @@
mxShape.prototype.createHandJiggle = function(c)
{
if (!this.outline && this.style != null && mxUtils.getValue(this.style,
- 'sketch', (urlParams['rough'] == '1') ?'1' : '0') != '0')
+ 'sketch', /*(urlParams['sketch'] != '1' && urlParams['rough'] == '1') ?
+ '1' : */'0') != '0')
{
if (mxUtils.getValue(this.style, 'sketchStyle', 'rough') == 'comic')
{
@@ -3118,10 +3120,14 @@
this.embedCssFonts(this.fontCss, mxUtils.bind(this, function(resolvedFontCss)
{
this.resolvedFontCss = resolvedFontCss;
- then();
+
+ if (then != null)
+ {
+ then();
+ }
}));
}
- else
+ else if (then != null)
{
then();
}
@@ -5294,12 +5300,12 @@
else if (colorset['fill'] == '')
{
btn.style.backgroundColor = mxUtils.getValue(ui.initialDefaultVertexStyle,
- mxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ?'#2a2a2a' : '#ffffff');
+ mxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');
}
else
{
btn.style.backgroundColor = colorset['fill'] || mxUtils.getValue(ui.initialDefaultVertexStyle,
- mxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ?'#2a2a2a' : '#ffffff');
+ mxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');
}
if (colorset['stroke'] == mxConstants.NONE)
@@ -5309,12 +5315,12 @@
else if (colorset['stroke'] == '')
{
btn.style.border = b + ' ' + mxUtils.getValue(ui.initialDefaultVertexStyle,
- mxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ?'#2a2a2a' : '#ffffff');
+ mxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');
}
else
{
btn.style.border = b + ' ' + (colorset['stroke'] || mxUtils.getValue(ui.initialDefaultVertexStyle,
- mxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ?'#2a2a2a' : '#ffffff'));
+ mxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ? Editor.darkColor : '#ffffff'));
}
if (colorset['title'] != null)
@@ -6418,7 +6424,7 @@
temp = this.stylesheet;
tempBg = this.defaultPageBackgroundColor;
this.defaultPageBackgroundColor = (this.defaultThemeName == 'darkTheme') ?
- '#ffffff' : '#2a2a2a';
+ '#ffffff' : Editor.darkColor;
this.stylesheet = this.getDefaultStylesheet();
// LATER: Fix math export in dark mode by fetching text nodes before
// calling refresh and changing the font color in-place
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 43caf320..f536b07f 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -3707,12 +3707,12 @@
{
mxClient.link('stylesheet', STYLE_PATH + '/dark.css');
- Dialog.backdropColor = '#2a2a2a';
+ Dialog.backdropColor = Editor.darkColor;
Format.inactiveTabBackgroundColor = 'black';
Graph.prototype.defaultThemeName = 'darkTheme';
- Graph.prototype.defaultPageBackgroundColor = '#2a2a2a';
+ Graph.prototype.defaultPageBackgroundColor = Editor.darkColor;
Graph.prototype.defaultPageBorderColor = '#505759';
- BaseFormatPanel.prototype.buttonBackgroundColor = '#2a2a2a';
+ BaseFormatPanel.prototype.buttonBackgroundColor = Editor.darkColor;
mxGraphHandler.prototype.previewColor = '#cccccc';
StyleFormatPanel.prototype.defaultStrokeColor = '#cccccc';
mxConstants.DROP_TARGET_COLOR = '#00ff00';
@@ -9001,7 +9001,7 @@
// Must be set before UI is created in superclass
if (this.isSettingsEnabled())
{
- if (urlParams['sketch'] == '1')
+ if (urlParams['sketch'] == '1' && urlParams['embedInline'] != '1')
{
this.doSetSketchMode((mxSettings.settings.sketchMode != null &&
urlParams['rough'] == null) ? mxSettings.settings.sketchMode :
@@ -10177,14 +10177,17 @@
{
window.setTimeout(mxUtils.bind(this, function()
{
- this.spinner.stop();
- this.doSetSketchMode(value);
+ this.spinner.stop();
+ this.doSetSketchMode(value);
- // Persist setting
- mxSettings.settings.sketchMode = value;
- mxSettings.save();
+ // Persist setting
+ if (urlParams['rough'] == null)
+ {
+ mxSettings.settings.sketchMode = value;
+ mxSettings.save();
+ }
- this.fireEvent(new mxEventObject('sketchModeChanged'));
+ this.fireEvent(new mxEventObject('sketchModeChanged'));
}), 0);
}
};
@@ -10205,7 +10208,32 @@
this.fireEvent(new mxEventObject('pagesVisibleChanged'));
}
};
-
+
+ /**
+ * Dynamic change of dark mode.
+ */
+ EditorUi.prototype.setInlineFullscreen = function(value)
+ {
+ if (Editor.inlineFullscreen != value)
+ {
+ Editor.inlineFullscreen = value;
+ this.fireEvent(new mxEventObject('inlineFullscreenChanged'));
+
+ var parent = window.opener || window.parent;
+ 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);
+ }
+ };
+
/**
* Dynamic change of dark mode.
*/
@@ -10217,11 +10245,11 @@
Editor.sketchMode = value;
this.menus.defaultFonts = Menus.prototype.defaultFonts;
- this.menus.defaultFontSize = 20;
- graph.defaultVertexStyle = {'pointerEvents': '0', 'fontSize': '20'};
- graph.defaultEdgeStyle = {'fontSize': '16', 'edgeStyle': 'none', 'rounded': '0',
- 'curved': '1', 'jettySize': 'auto', 'orthogonalLoop': '1', 'endArrow': 'open',
- 'endSize': '14', 'startSize': '14'};
+ this.menus.defaultFontSize = (value) ? 20 : 16;
+ graph.defaultVertexStyle = {'pointerEvents': '0', 'fontSize': this.menus.defaultFontSize};
+ graph.defaultEdgeStyle = {'fontSize': this.menus.defaultFontSize - 4, 'edgeStyle': 'none',
+ 'rounded': '0', 'curved': '1', 'jettySize': 'auto', 'orthogonalLoop': '1',
+ 'endArrow': 'open', 'endSize': '14', 'startSize': '14'};
if (value)
{
@@ -10249,7 +10277,6 @@
graph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
Graph.prototype.defaultVertexStyle = graph.defaultVertexStyle;
Graph.prototype.defaultEdgeStyle = graph.defaultEdgeStyle;
-
this.clearDefaultStyle();
}
};
@@ -11472,11 +11499,18 @@
{
if (urlParams['spin'] != '1' || this.spinner.spin(document.body, mxResources.get('loading')))
{
+ var initialized = false;
+
this.installMessageHandler(mxUtils.bind(this, function(xml, evt, modified, convertToSketch)
{
- this.spinner.stop();
- this.addEmbedButtons();
- this.setGraphEnabled(true);
+ if (!initialized)
+ {
+ initialized = true;
+
+ this.spinner.stop();
+ this.addEmbedButtons();
+ this.setGraphEnabled(true);
+ }
if (xml == null || xml.length == 0)
{
@@ -11488,6 +11522,7 @@
this.mode = App.MODE_EMBED;
this.setFileData(xml);
+ // TODO: Check if cellsInserted should be fired instead here
if (convertToSketch)
{
try
@@ -11598,6 +11633,33 @@
/**
* Adds the buttons for embedded mode.
*/
+ EditorUi.prototype.sendEmbeddedSvgExport = function()
+ {
+ this.getEmbeddedSvg(this.getFileData(true, null, null, null, null,
+ null, null, null, null, false),
+ this.editor.graph, null, true, mxUtils.bind(this, function(svg)
+ {
+ this.editor.modified = false;
+ var parent = window.opener || window.parent;
+ parent.postMessage(JSON.stringify({
+ event: 'export',
+ data: Editor.createSvgDataUri(svg)
+ }), '*');
+ }), null, null, true, null, 1, 8);
+
+ this.diagramContainer.removeAttribute('data-bounds');
+ Editor.inlineFullscreen = false;
+ this.editor.graph.model.clear();
+ this.editor.undoManager.clear();
+ this.setBackgroundImage(null);
+ this.editor.modified = false;
+
+ this.fireEvent(new mxEventObject('editInlineStop'));
+ };
+
+ /**
+ * Adds the buttons for embedded mode.
+ */
EditorUi.prototype.installMessageHandler = function(fn)
{
var changeListener = null;
@@ -11630,6 +11692,7 @@
}
var data = evt.data;
+ var afterLoad = null;
var extractDiagramXml = mxUtils.bind(this, function(data)
{
@@ -12250,6 +12313,51 @@
{
urlParams['noSaveBtn'] = data.noSaveBtn;
}
+
+ if (data.rough != null)
+ {
+ var initial = Editor.sketchMode;
+ this.doSetSketchMode(data.rough);
+
+ if (initial != Editor.sketchMode)
+ {
+ this.fireEvent(new mxEventObject('sketchModeChanged'));
+ }
+ }
+
+ if (data.dark != null)
+ {
+ var initial = Editor.darkMode;
+ this.doSetDarkMode(data.dark);
+
+ if (initial != Editor.darkMode)
+ {
+ this.fireEvent(new mxEventObject('darkModeChanged'));
+ }
+ }
+
+ if (data.rect != null)
+ {
+ this.diagramContainer.style.border = '2px solid #295fcc';
+ this.diagramContainer.style.top = data.rect.top + 'px';
+ this.diagramContainer.style.left = data.rect.left + 'px';
+ this.diagramContainer.style.height = data.rect.height + 'px';
+ this.diagramContainer.style.width = data.rect.width + 'px';
+ this.diagramContainer.style.bottom = '';
+ this.diagramContainer.style.right = '';
+
+ afterLoad = mxUtils.bind(this, function()
+ {
+ var graph = this.editor.graph;
+ var prev = graph.maxFitScale;
+ graph.maxFitScale = 1;
+ graph.fit(20);
+ graph.maxFitScale = prev;
+ graph.container.scrollTop -= 20;
+ graph.container.scrollLeft -= 20;
+ this.fireEvent(new mxEventObject('editInlineStart', 'data', [data]));
+ });
+ }
if (data.noExitBtn != null && urlParams['noExitBtn'] == null)
{
@@ -12413,6 +12521,11 @@
parent.postMessage(JSON.stringify(resp), '*');
}
+
+ if (afterLoad != null)
+ {
+ afterLoad();
+ }
});
if (data != null && typeof data.substring === 'function' && data.substring(0, 34) == 'data:application/vnd.visio;base64,')
@@ -12492,7 +12605,7 @@
*/
EditorUi.prototype.addEmbedButtons = function()
{
- if (this.menubar != null)
+ if (this.menubar != null && urlParams['embedInline'] != '1')
{
var div = document.createElement('div');
div.style.display = 'inline-block';
@@ -12504,7 +12617,7 @@
var button = document.createElement('button');
button.className = 'geBigButton';
var lastBtn = button;
-
+
if (urlParams['noSaveBtn'] == '1')
{
if (urlParams['saveAndExit'] != '0')
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index 20c76e4d..3e23aa05 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -190,6 +190,15 @@ if (urlParams['lightbox'] == '1')
urlParams['chrome'] = '0';
}
+// Embed inline is embed mode and sketch UI
+if (urlParams['embedInline'] == '1')
+{
+ urlParams['embed'] = '1';
+ urlParams['ui'] = 'sketch';
+ urlParams['proto'] = 'json';
+ urlParams['prefetchFonts'] = '1';
+}
+
/**
* Returns the global UI setting before running static draw.io code
*/
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index ae3e6982..e8dba918 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -255,18 +255,31 @@
var fullscreenAction = editorUi.actions.addAction('fullscreen', function()
{
- if (document.fullscreenElement == null)
+ if (urlParams['embedInline'] == '1')
{
- document.body.requestFullscreen();
+ editorUi.setInlineFullscreen(!Editor.inlineFullscreen);
}
else
{
- document.exitFullscreen();
+ if (document.fullscreenElement == null)
+ {
+ document.body.requestFullscreen();
+ }
+ else
+ {
+ document.exitFullscreen();
+ }
}
});
- fullscreenAction.visible = document.fullscreenEnabled && document.body.requestFullscreen != null;
+ fullscreenAction.visible = urlParams['embedInline'] == '1' ||
+ (document.fullscreenEnabled && document.body.requestFullscreen != null);
fullscreenAction.setToggleAction(true);
- fullscreenAction.setSelectedCallback(function() { return document.fullscreenElement != null; });
+ fullscreenAction.setSelectedCallback(function()
+ {
+ return urlParams['embedInline'] == '1' ?
+ Editor.inlineFullscreen :
+ document.fullscreenElement != null;
+ });
editorUi.actions.addAction('properties...', function()
{
@@ -2278,23 +2291,30 @@
editorUi.actions.addAction('exit', function()
{
- var fn = function()
+ if (urlParams['embedInline'] == '1')
{
- editorUi.editor.modified = false;
- var msg = (urlParams['proto'] == 'json') ? JSON.stringify({event: 'exit',
- modified: editorUi.editor.modified}) : '';
- var parent = window.opener || window.parent;
- parent.postMessage(msg, '*');
- }
-
- if (!editorUi.editor.modified)
- {
- fn();
+ editorUi.sendEmbeddedSvgExport();
}
else
{
- editorUi.confirm(mxResources.get('allChangesLost'), null, fn,
- mxResources.get('cancel'), mxResources.get('discardChanges'));
+ var fn = function()
+ {
+ editorUi.editor.modified = false;
+ var msg = (urlParams['proto'] == 'json') ? JSON.stringify({event: 'exit',
+ modified: editorUi.editor.modified}) : '';
+ var parent = window.opener || window.parent;
+ parent.postMessage(msg, '*');
+ }
+
+ if (!editorUi.editor.modified)
+ {
+ fn();
+ }
+ else
+ {
+ editorUi.confirm(mxResources.get('allChangesLost'), null, fn,
+ mxResources.get('cancel'), mxResources.get('discardChanges'));
+ }
}
});
}
@@ -3752,20 +3772,23 @@
this.addMenuItems(menu, ['-', 'pageSetup', 'print', '-', 'rename'], parent);
- if (urlParams['noSaveBtn'] == '1')
+ if (urlParams['embedInline'] != '1')
{
- if (urlParams['saveAndExit'] != '0')
+ if (urlParams['noSaveBtn'] == '1')
{
- this.addMenuItems(menu, ['saveAndExit'], parent);
+ if (urlParams['saveAndExit'] != '0')
+ {
+ this.addMenuItems(menu, ['saveAndExit'], parent);
+ }
}
- }
- else
- {
- this.addMenuItems(menu, ['save'], parent);
-
- if (urlParams['saveAndExit'] == '1')
+ else
{
- this.addMenuItems(menu, ['saveAndExit'], parent);
+ this.addMenuItems(menu, ['save'], parent);
+
+ if (urlParams['saveAndExit'] == '1')
+ {
+ this.addMenuItems(menu, ['saveAndExit'], parent);
+ }
}
}
@@ -3871,7 +3894,7 @@
this.addMenuItems(menu, ['-', 'revisionHistory'], parent);
}
- if (file != null && editorUi.fileNode != null)
+ if (file != null && editorUi.fileNode != null && urlParams['embedInline'] != '1')
{
var filename = (file.getTitle() != null) ?
file.getTitle() : editorUi.defaultFilename;
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 3b57b875..854823e8 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -11,7 +11,16 @@ EditorUi.initMinimalTheme = function()
return;
}
- var iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ var iw = 0;
+
+ try
+ {
+ iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ }
+ catch (e)
+ {
+ // ignore
+ }
/**
*
@@ -290,9 +299,12 @@ EditorUi.initMinimalTheme = function()
this.doSetDarkMode(value);
// Persist setting
- mxSettings.settings.darkMode = value;
- mxSettings.save();
-
+ if (urlParams['dark'] == null)
+ {
+ mxSettings.settings.darkMode = value;
+ mxSettings.save();
+ }
+
this.fireEvent(new mxEventObject('darkModeChanged'));
}), 0);
}
@@ -320,10 +332,13 @@ EditorUi.initMinimalTheme = function()
// Sets instance vars and graph stylesheet
this.spinner.opts.color = Editor.isDarkMode() ? '#c0c0c0' : '#000';
this.setGridColor(Editor.isDarkMode() ? graph.view.defaultDarkGridColor : graph.view.defaultGridColor);
- graph.defaultPageBackgroundColor = Editor.isDarkMode() ? '#2a2a2a' : '#ffffff';
graph.defaultPageBorderColor = Editor.isDarkMode() ? '#505759' : '#ffffff';
graph.defaultThemeName = Editor.isDarkMode() ? 'darkTheme' : 'default-style2';
graph.graphHandler.previewColor = Editor.isDarkMode() ? '#cccccc' : 'black';
+ graph.defaultPageBackgroundColor = (urlParams['embedInline'] == '1') ? 'transparent' :
+ (Editor.isDarkMode() ? Editor.darkColor : '#ffffff');
+ document.body.style.backgroundColor = (urlParams['embedInline'] == '1') ? 'transparent' :
+ (Editor.isDarkMode() ? Editor.darkColor : '#ffffff');
graph.loadStylesheet();
// Destroys windows with code for dark mode
@@ -354,18 +369,16 @@ EditorUi.initMinimalTheme = function()
}
// Sets global vars
- Dialog.backdropColor = Editor.isDarkMode() ? '#2a2a2a' : 'white';
+ Dialog.backdropColor = Editor.isDarkMode() ? Editor.darkColor : 'white';
StyleFormatPanel.prototype.defaultStrokeColor = Editor.isDarkMode() ? '#cccccc' : 'black';
- BaseFormatPanel.prototype.buttonBackgroundColor = Editor.isDarkMode() ? '#2a2a2a' : 'white';
+ BaseFormatPanel.prototype.buttonBackgroundColor = Editor.isDarkMode() ? Editor.darkColor : 'white';
Format.inactiveTabBackgroundColor = Editor.isDarkMode() ? 'black' : '#f0f0f0';
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;
- document.body.style.backgroundColor = Editor.isDarkMode() ?
- '#2a2a2a' : '#ffffff';
-
+
// Updates CSS
styleElt.innerHTML = Editor.createMinimalCss();
@@ -431,7 +444,7 @@ EditorUi.initMinimalTheme = function()
'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: ' + (Editor.isDarkMode() ? '#2a2a2a' : '#fff') + ' !important; border: none !important; }' +
+ 'html body div.geDialog button.geBigButton { color: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + ' !important; border: none !important; }' +
'.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }' +
'html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }' +
'html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: ' + (Editor.isDarkMode() ? '#cccccc' : '#353535') + ' !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }' +
@@ -451,19 +464,19 @@ EditorUi.initMinimalTheme = function()
'td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }' +
'html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }' +
// Styling for Minimal
- '.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: ' + (Editor.isDarkMode() ? '#2a2a2a' : '#fff') + ' !important; }' +
- '.geToolbarContainer { background: ' + (Editor.isDarkMode() ? '#2a2a2a' : '#fff') + '; }' +
- 'div.geSidebarContainer { background-color: ' + (Editor.isDarkMode() ? '#2a2a2a' : '#fff') + '; }' +
- 'div.geSidebarContainer .geTitle { background-color: ' + (Editor.isDarkMode() ? '#2a2a2a' : '#fdfdfd') + '; }' +
+ '.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + ' !important; }' +
+ '.geToolbarContainer { background: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + '; }' +
+ 'div.geSidebarContainer { background-color: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + '; }' +
+ 'div.geSidebarContainer .geTitle { background-color: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fdfdfd') + '; }' +
'div.mxWindow td.mxWindowPane button { background-image: none; float: none; }' +
'td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }' +
- 'div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:' + (Editor.isDarkMode() ? '#2a2a2a' : '#fff') + ' !important; }' +
+ 'div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + ' !important; }' +
'div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}' +
'div.mxWindow *:not(svg *) { font-family: inherit !important; }' +
// Minimal Style UI
'html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }' +
- 'html div.geInactivePage { background: ' + (Editor.isDarkMode() ? '#2a2a2a' : 'rgb(249, 249, 249)') + ' !important; color: #A0A0A0 !important; } ' +
- 'html div.geActivePage { background: ' + (Editor.isDarkMode() ? '#2a2a2a' : '#fff') + ' !important; ' + (Editor.isDarkMode() ? '' : 'color: #353535 !important; } ') +
+ 'html div.geInactivePage { background: ' + (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; }' +
@@ -604,10 +617,10 @@ EditorUi.initMinimalTheme = function()
this.buttonContainer.style.paddingTop = '4px';
}
};
-
+
EditorUi.prototype.addEmbedButtons = function()
{
- if (this.buttonContainer != null)
+ if (this.buttonContainer != null && urlParams['embedInline'] != '1')
{
var div = document.createElement('div');
div.style.display = 'inline-block';
@@ -622,16 +635,19 @@ EditorUi.initMinimalTheme = function()
if (urlParams['noSaveBtn'] == '1')
{
- var saveAndExitTitle = urlParams['publishClose'] == '1' ? mxResources.get('publish') : mxResources.get('saveAndExit');
- mxUtils.write(button, saveAndExitTitle);
- button.setAttribute('title', saveAndExitTitle);
-
- mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
+ if (urlParams['saveAndExit'] != '0')
{
- this.actions.get('saveAndExit').funct();
- }));
-
- div.appendChild(button);
+ var saveAndExitTitle = urlParams['publishClose'] == '1' ? mxResources.get('publish') : mxResources.get('saveAndExit');
+ mxUtils.write(button, saveAndExitTitle);
+ button.setAttribute('title', saveAndExitTitle);
+
+ mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
+ {
+ this.actions.get('saveAndExit').funct();
+ }));
+
+ div.appendChild(button);
+ }
}
else
{
@@ -683,6 +699,8 @@ EditorUi.initMinimalTheme = function()
this.buttonContainer.appendChild(div);
this.buttonContainer.style.top = '6px';
+
+ this.editor.fireEvent(new mxEventObject('statusChanged'));
}
};
@@ -761,12 +779,13 @@ EditorUi.initMinimalTheme = function()
this.addMenuItems(menu, ['-', 'lockUnlock'], null, evt);
}
}
-
+
if (graph.isEnabled() && graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['-', 'fullscreen']);
- if (Editor.isDarkMode() || (!mxClient.IS_IE && !mxClient.IS_IE11))
+ if (urlParams['embedInline'] != '1' && (Editor.isDarkMode() ||
+ (!mxClient.IS_IE && !mxClient.IS_IE11)))
{
this.addMenuItems(menu, ['toggleDarkMode']);
}
@@ -911,7 +930,7 @@ EditorUi.initMinimalTheme = function()
var ui = this.editorUi;
var graph = ui.editor.graph;
-
+
ui.actions.get('editDiagram').label = mxResources.get('formatXml') + '...';
ui.actions.get('createShape').label = mxResources.get('shape') + '...';
ui.actions.get('outline').label = mxResources.get('outline') + '...';
@@ -1030,13 +1049,15 @@ EditorUi.initMinimalTheme = function()
}
else if (urlParams['embed'] == '1')
{
- if (urlParams['noSaveBtn'] != '1')
+ if (urlParams['noSaveBtn'] != '1' &&
+ urlParams['embedInline'] != '1')
{
ui.menus.addMenuItems(menu, ['-', 'save'], parent);
}
if (urlParams['saveAndExit'] == '1' ||
- (urlParams['noSaveBtn'] == '1' && urlParams['saveAndExit'] != '0'))
+ (urlParams['noSaveBtn'] == '1' &&
+ urlParams['saveAndExit'] != '0'))
{
ui.menus.addMenuItems(menu, ['saveAndExit'], parent);
}
@@ -1104,7 +1125,7 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['print'], parent);
}
- if (file != null && ui.fileNode != null)
+ if (file != null && ui.fileNode != null && urlParams['embedInline'] != '1')
{
var filename = (file.getTitle() != null) ?
file.getTitle() : ui.defaultFilename;
@@ -1121,7 +1142,10 @@ EditorUi.initMinimalTheme = function()
if (urlParams['embed'] == '1')
{
- ui.menus.addMenuItems(menu, ['-', 'exit'], parent);
+ if (urlParams['noExitBtn'] != '1')
+ {
+ ui.menus.addMenuItems(menu, ['-', 'exit'], parent);
+ }
}
else
{
@@ -1234,21 +1258,24 @@ EditorUi.initMinimalTheme = function()
menu.addSeparator(parent);
ui.menus.addMenuItems(menu, ['scrollbars', 'tooltips', 'ruler', '-', 'copyConnect', 'collapseExpand', '-'], parent);
- if (urlParams['sketch'] == '1')
+ if (urlParams['embedInline'] != '1')
{
- this.addMenuItems(menu, ['toggleSketchMode'], parent);
- }
+ if (urlParams['sketch'] == '1')
+ {
+ this.addMenuItems(menu, ['toggleSketchMode'], parent);
+ }
- this.addMenuItems(menu, ['toggleDarkMode'], parent);
+ this.addMenuItems(menu, ['toggleDarkMode'], parent);
- if (urlParams['embed'] != '1' && (isLocalStorage || mxClient.IS_CHROMEAPP))
- {
- ui.menus.addMenuItems(menu, ['-', 'showStartScreen', 'search', 'scratchpad'], parent);
- }
+ if (urlParams['embed'] != '1' && (isLocalStorage || mxClient.IS_CHROMEAPP))
+ {
+ ui.menus.addMenuItems(menu, ['-', 'showStartScreen', 'search', 'scratchpad'], parent);
+ }
- if (urlParams['sketch'] == '1')
- {
- this.addMenuItems(menu, ['togglePagesVisible'], parent);
+ if (urlParams['sketch'] == '1')
+ {
+ this.addMenuItems(menu, ['togglePagesVisible'], parent);
+ }
}
menu.addSeparator(parent);
@@ -1357,10 +1384,16 @@ EditorUi.initMinimalTheme = function()
EditorUi.prototype.init = function()
{
editorUiInit.apply(this, arguments);
- this.doSetDarkMode((urlParams['dark'] != null) ?
- urlParams['dark'] == 1 && !mxClient.IS_IE &&
- !mxClient.IS_IE11 : mxSettings.settings.darkMode);
-
+
+ if (urlParams['embedInline'] != '1')
+ {
+ this.doSetDarkMode((urlParams['dark'] != null) ?
+ urlParams['dark'] == 1 && !mxClient.IS_IE &&
+ !mxClient.IS_IE11 : ((mxSettings.settings.darkMode != null) ?
+ mxSettings.settings.darkMode : (window.matchMedia &&
+ window.matchMedia('(prefers-color-scheme: dark)').matches)));
+ }
+
var div = document.createElement('div');
div.style.cssText = 'position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;';
div.style.bottom = (urlParams['embed'] != '1' || urlParams['libraries'] == '1') ? '63px' : '32px';
@@ -1731,12 +1764,127 @@ EditorUi.initMinimalTheme = function()
}
graph.refresh();
- graph.view.validateBackground()
+ graph.view.validateBackground();
});
ui.addListener('darkModeChanged', refreshSidebar);
ui.addListener('sketchModeChanged', refreshSidebar);
+ var inlineSizeChanged = mxUtils.bind(this, function()
+ {
+ if (Editor.inlineFullscreen)
+ {
+ toolbar.style.left = '10px';
+ toolbar.style.top = '10px';
+
+ picker.style.left = '10px';
+ picker.style.top = '60px';
+
+ footer.style.top = '10px';
+ footer.style.right = '12px';
+ footer.style.left = '';
+
+ ui.diagramContainer.setAttribute('data-bounds', ui.diagramContainer.style.top + ' ' +
+ ui.diagramContainer.style.left + ' ' + ui.diagramContainer.style.width + ' ' +
+ ui.diagramContainer.style.height);
+
+ ui.diagramContainer.style.top = '0px';
+ ui.diagramContainer.style.left = '0px';
+ ui.diagramContainer.style.bottom = '0px';
+ ui.diagramContainer.style.right = '0px';
+ ui.diagramContainer.style.width = '';
+ ui.diagramContainer.style.height = '';
+ }
+ else
+ {
+ var bounds = ui.diagramContainer.getAttribute('data-bounds');
+
+ if (bounds != null)
+ {
+ ui.diagramContainer.style.background = 'transparent';
+ ui.diagramContainer.removeAttribute('data-bounds');
+ var gb = graph.getGraphBounds();
+ var tokens = bounds.split(' ');
+
+ ui.diagramContainer.style.top = tokens[0];
+ ui.diagramContainer.style.left = tokens[1];
+ ui.diagramContainer.style.width = (gb.width + 50) + 'px';
+ ui.diagramContainer.style.height = (gb.height + 46) + 'px';
+ ui.diagramContainer.style.bottom = '';
+ ui.diagramContainer.style.right = '';
+
+ var parent = window.opener || window.parent;
+ parent.postMessage(JSON.stringify({
+ event: 'resize',
+ rect: ui.diagramContainer.getBoundingClientRect()
+ }), '*');
+ ui.refresh();
+ }
+
+ toolbar.style.left = ui.diagramContainer.offsetLeft + 'px';
+ toolbar.style.top = (ui.diagramContainer.offsetTop -
+ toolbar.offsetHeight - 4) + 'px';
+
+ picker.style.display = '';
+ picker.style.left = (ui.diagramContainer.offsetLeft -
+ picker.offsetWidth - 4) + 'px';
+ picker.style.top = ui.diagramContainer.offsetTop + 'px';
+
+ footer.style.left = (ui.diagramContainer.offsetLeft +
+ ui.diagramContainer.offsetWidth -
+ footer.offsetWidth) + 'px';
+ footer.style.top = toolbar.style.top;
+ footer.style.right = '';
+
+ ui.bottomResizer.style.left = (ui.diagramContainer.offsetLeft +
+ (ui.diagramContainer.offsetWidth -
+ ui.bottomResizer.offsetWidth) / 2) + 'px';
+ ui.bottomResizer.style.top = (ui.diagramContainer.offsetTop +
+ ui.diagramContainer.offsetHeight -
+ ui.bottomResizer.offsetHeight / 2 - 1) + 'px';
+
+ ui.rightResizer.style.left = (ui.diagramContainer.offsetLeft +
+ ui.diagramContainer.offsetWidth -
+ ui.rightResizer.offsetWidth / 2 - 1) + 'px';
+ ui.rightResizer.style.top = (ui.diagramContainer.offsetTop +
+ (ui.diagramContainer.offsetHeight -
+ ui.bottomResizer.offsetHeight) / 2) + 'px';
+ }
+
+ ui.bottomResizer.style.visibility = (Editor.inlineFullscreen) ? 'hidden' : '';
+ ui.rightResizer.style.visibility = ui.bottomResizer.style.visibility;
+ menubar.style.display = 'none';
+ toolbar.style.visibility = '';
+ footer.style.visibility = '';
+ });
+
+ var editInlineStart = mxUtils.bind(this, function()
+ {
+ this.diagramContainer.style.background = (Editor.inlineFullscreen) ?
+ (Editor.isDarkMode() ? Editor.darkColor : '#ffffff') : 'transparent';
+ inlineSizeChanged();
+ });
+
+ ui.addListener('inlineFullscreenChanged', editInlineStart);
+ ui.addListener('editInlineStart', editInlineStart);
+
+ if (urlParams['embedInline'] == '1')
+ {
+ ui.addListener('darkModeChanged', editInlineStart);
+ }
+
+ ui.addListener('editInlineStop', mxUtils.bind(this, function(evt)
+ {
+ ui.diagramContainer.style.width = '10px';
+ ui.diagramContainer.style.height = '10px';
+ ui.diagramContainer.style.border = '';
+ ui.bottomResizer.style.visibility = 'hidden';
+ ui.rightResizer.style.visibility = 'hidden';
+ toolbar.style.visibility = 'hidden';
+ footer.style.visibility = 'hidden';
+ picker.style.display = 'none';
+ }));
+
// Stops panning while freehand is active
if (Graph.touchStyle)
{
@@ -1860,6 +2008,13 @@ EditorUi.initMinimalTheme = function()
menubar.style.visibility = (menubar.clientWidth > 12) ? '' : 'hidden';
}));
}
+ else
+ {
+ ui.editor.addListener('statusChanged', mxUtils.bind(this, function()
+ {
+ menubar.style.visibility = (menubar.clientWidth > 16) ? '' : 'hidden';
+ }));
+ }
elt = addMenu('diagram', null, Editor.menuImage);
elt.style.boxShadow = 'none';
@@ -1994,7 +2149,10 @@ EditorUi.initMinimalTheme = function()
addAction(ui.actions.get('insertTemplate'), mxResources.get('template'), Editor.templateImage);
}
- picker.appendChild(foldImg);
+ if (urlParams['embedInline'] != '1')
+ {
+ picker.appendChild(foldImg);
+ }
});
mxEvent.addListener(foldImg, 'click', mxUtils.bind(this, function()
@@ -2069,9 +2227,11 @@ EditorUi.initMinimalTheme = function()
var redoAction = ui.actions.get('redo');
var undoElt = addMenuItem('', undoAction.funct, null, mxResources.get('undo') + ' (' + undoAction.shortcut + ')', undoAction, Editor.undoImage);
var redoElt = addMenuItem('', redoAction.funct, null, mxResources.get('redo') + ' (' + redoAction.shortcut + ')', redoAction, Editor.redoImage);
+ var fullscreenElt = addMenuItem('', fullscreenAction.funct, null, mxResources.get('fullscreen'), fullscreenAction, Editor.fullscreenImage);
if (footer != null)
{
+ fullscreenElt.parentNode.removeChild(fullscreenElt);
var deleteAction = ui.actions.get('delete');
var deleteElt = addMenuItem('', deleteAction.funct, null, mxResources.get('delete'), deleteAction, Editor.trashImage);
deleteElt.style.opacity = '0.1';
@@ -2145,6 +2305,11 @@ EditorUi.initMinimalTheme = function()
' (' + Editor.ctrlKey + ' +/Alt+Mousewheel)', zoomInAction, Editor.zoomInImage);
footer.appendChild(zoomInElt);
+ if (urlParams['embedInline'] == '1')
+ {
+ footer.appendChild(fullscreenElt);
+ }
+
var pageMenu = this.createPageMenuTab(false);
pageMenu.style.display = 'none';
pageMenu.style.position = '';
@@ -2206,7 +2371,6 @@ EditorUi.initMinimalTheme = function()
}
else
{
- var fullscreenElt = addMenuItem('', fullscreenAction.funct, null, mxResources.get('fullscreen'), fullscreenAction, Editor.fullscreenImage);
var fitElt = addMenuItem('', fitFunction, true, mxResources.get('fit') + ' (' + Editor.ctrlKey + '+H)', resetViewAction, Editor.zoomFitImage);
menubar.style.cssText = 'position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;' +
@@ -2279,37 +2443,40 @@ EditorUi.initMinimalTheme = function()
function refreshMenu()
{
- // Removes all existing menu items
- var node = menubar.firstChild;
-
- while (node != null)
- {
- var temp = node.nextSibling;
-
- if (node.className == 'geMenuItem' || node.className == 'geItem')
- {
- node.parentNode.removeChild(node);
- }
-
- node = temp;
- }
-
- before = menubar.firstChild;
- iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
- var small = iw < 1000 || urlParams['sketch'] == '1';
- var appElt = null;
-
- if (!small)
- {
- appElt = addMenu('diagram');
- }
-
if (urlParams['sketch'] == '1')
{
- toolbar.style.left = (picker.offsetTop - picker.offsetHeight / 2 < 58) ? '70px' : '10px';
+ if (urlParams['embedInline'] != '1')
+ {
+ toolbar.style.left = (picker.offsetTop - picker.offsetHeight / 2 < 58) ? '70px' : '10px';
+ }
}
else
{
+ // Removes all existing menu items
+ var node = menubar.firstChild;
+
+ while (node != null)
+ {
+ var temp = node.nextSibling;
+
+ if (node.className == 'geMenuItem' || node.className == 'geItem')
+ {
+ node.parentNode.removeChild(node);
+ }
+
+ node = temp;
+ }
+
+ before = menubar.firstChild;
+ iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ var small = iw < 1000 || urlParams['sketch'] == '1';
+ var appElt = null;
+
+ if (!small)
+ {
+ appElt = addMenu('diagram');
+ }
+
var temp = (small) ? addMenu('diagram', null, Editor.drawLogoImage) : null;
if (temp != null)
@@ -2440,6 +2607,112 @@ EditorUi.initMinimalTheme = function()
ui.menus.findReplaceWindow.window.fit();
}
});
+
+ if (urlParams['embedInline'] == '1')
+ {
+ document.body.style.cursor = 'text';
+ picker.style.transform = '';
+
+ mxEvent.addGestureListeners(ui.diagramContainer.parentNode, function(evt)
+ {
+ if (mxEvent.getSource(evt) ==
+ ui.diagramContainer.parentNode)
+ {
+ ui.sendEmbeddedSvgExport();
+ }
+ });
+
+ var div = document.createElement('div');
+ div.style.position = 'absolute';
+ div.style.width = '10px';
+ div.style.height = '10px';
+ div.style.borderRadius = '5px';
+ div.style.border = '1px solid gray';
+ div.style.background = '#ffffff';
+ div.style.cursor = 'row-resize';
+ ui.diagramContainer.parentNode.appendChild(div);
+ ui.bottomResizer = div;
+
+ var x0 = null;
+ var y0 = null;
+ var w0 = null;
+ var h0 = null;
+
+ mxEvent.addGestureListeners(div, function(evt)
+ {
+ h0 = parseInt(ui.diagramContainer.style.height);
+ y0 = mxEvent.getClientY(evt);
+ graph.popupMenuHandler.hideMenu();
+ mxEvent.consume(evt);
+ });
+
+ div = div.cloneNode(false);
+ div.style.cursor = 'col-resize';
+ ui.diagramContainer.parentNode.appendChild(div);
+ ui.rightResizer = div;
+
+ mxEvent.addGestureListeners(div, function(evt)
+ {
+ w0 = parseInt(ui.diagramContainer.style.width);
+ x0 = mxEvent.getClientX(evt);
+ graph.popupMenuHandler.hideMenu();
+ mxEvent.consume(evt);
+ });
+
+ mxEvent.addGestureListeners(document.body, null, function(evt)
+ {
+ var changed = false;
+
+ if (x0 != null)
+ {
+ ui.diagramContainer.style.width = Math.max(20,
+ w0 + mxEvent.getClientX(evt) - x0) + 'px';
+ changed = true;
+ }
+
+ if (y0 != null)
+ {
+ ui.diagramContainer.style.height = Math.max(20,
+ h0 + mxEvent.getClientY(evt) - y0) + 'px';
+ changed = true;
+ }
+
+ if (changed)
+ {
+ var parent = window.opener || window.parent;
+ parent.postMessage(JSON.stringify({
+ event: 'resize',
+ fullscreen: Editor.inlineFullscreen,
+ rect: ui.diagramContainer.getBoundingClientRect()
+ }), '*');
+ ui.fireEvent(new mxEventObject('editInlineStart'));
+ ui.refresh();
+ }
+ }, function(evt)
+ {
+ if (x0 != null || y0 != null)
+ {
+ mxEvent.consume(evt);
+ }
+
+ x0 = null;
+ y0 = null;
+ });
+
+ graph.defaultPageBackgroundColor = 'transparent';
+ this.diagramContainer.style.borderRadius = '4px';
+ document.body.style.backgroundColor = 'transparent';
+ ui.bottomResizer.style.visibility = 'hidden';
+ ui.rightResizer.style.visibility = 'hidden';
+ toolbar.style.visibility = 'hidden';
+ footer.style.visibility = 'hidden';
+ picker.style.display = 'none';
+ }
+
+ if (urlParams['prefetchFonts'] == '1')
+ {
+ ui.editor.loadFonts();
+ }
};
};
diff --git a/src/main/webapp/js/diagramly/Pages.js b/src/main/webapp/js/diagramly/Pages.js
index 109d151b..a5c9490c 100644
--- a/src/main/webapp/js/diagramly/Pages.js
+++ b/src/main/webapp/js/diagramly/Pages.js
@@ -1281,7 +1281,7 @@ EditorUi.prototype.updateTabContainer = function()
if (this.pages[index] == this.currentPage)
{
tab.className = 'geActivePage';
- tab.style.backgroundColor = Editor.isDarkMode() ? '#2a2a2a' : '#fff';
+ tab.style.backgroundColor = Editor.isDarkMode() ? Editor.darkColor : '#fff';
}
else
{
diff --git a/src/main/webapp/js/diagramly/mxRuler.js b/src/main/webapp/js/diagramly/mxRuler.js
index 930e2792..37156717 100644
--- a/src/main/webapp/js/diagramly/mxRuler.js
+++ b/src/main/webapp/js/diagramly/mxRuler.js
@@ -35,8 +35,8 @@ function mxRuler(editorUi, unit, isVertical, isSecondery)
guideClr: '#0000BB'
} : {
bkgClr: '#202020',
- outBkgClr: '#2a2a2a',
- cornerClr: '#2a2a2a',
+ outBkgClr: Editor.darkColor,
+ cornerClr: Editor.darkColor,
strokeClr: '#505759',
fontClr: '#BBBBBB',
guideClr: '#0088cf'
@@ -68,8 +68,8 @@ function mxRuler(editorUi, unit, isVertical, isSecondery)
guideClr: '#0000BB'
} : {
bkgClr: '#202020',
- outBkgClr: '#2a2a2a',
- cornerClr: '#2a2a2a',
+ outBkgClr: Editor.darkColor,
+ cornerClr: Editor.darkColor,
strokeClr: '#505759',
fontClr: '#BBBBBB',
guideClr: '#0088cf'
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index 37e89d93..81f8bc2e 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -217,9 +217,19 @@ Editor.enableNativeCipboard = window == window.top && !mxClient.IS_FF && navigat
/**
* Dynamic change of dark mode for minimal and sketch theme.
*/
+Editor.sketchMode = false;
+
+/**
+ * Dynamic change of dark mode for minimal and sketch theme.
+ */
Editor.darkMode = false;
/**
+ * Dynamic change of dark mode for minimal and sketch theme.
+ */
+Editor.darkColor = '#2a2a2a';
+
+/**
* Dynamic change of dark mode.
*/
Editor.isDarkMode = function(value)
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index edebdf30..133d6aaa 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -297,7 +297,7 @@ EditorUi = function(editor, container, lightbox)
var key = appliedStyles[j];
var styleValue = current[key];
- if (styleValue != null && (key != 'shape' || edge))
+ if (styleValue != null && key != 'edgeStyle' && (key != 'shape' || edge))
{
// Special case: Connect styles are not applied here but in the connection handler
if (!edge || applyAll || mxUtils.indexOf(connectStyles, key) < 0)
@@ -3939,8 +3939,6 @@ EditorUi.prototype.refresh = function(sizeDidChange)
var diagContOffset = this.getDiagramContainerOffset();
var contLeft = (this.hsplit.parentNode != null) ? (effHsplitPosition + this.splitSize) : 0;
- this.diagramContainer.style.left = (contLeft + diagContOffset.x) + 'px';
- this.diagramContainer.style.top = (tmp + diagContOffset.y) + 'px';
this.footerContainer.style.height = this.footerHeight + 'px';
this.hsplit.style.top = this.sidebarContainer.style.top;
this.hsplit.style.bottom = (this.footerHeight + off) + 'px';
@@ -3957,7 +3955,6 @@ EditorUi.prototype.refresh = function(sizeDidChange)
this.footerContainer.style.bottom = off + 'px';
}
- this.diagramContainer.style.right = fw + 'px';
var th = 0;
if (this.tabContainer != null)
@@ -3969,8 +3966,15 @@ EditorUi.prototype.refresh = function(sizeDidChange)
this.sidebarContainer.style.bottom = (this.footerHeight + sidebarFooterHeight + off) + 'px';
this.formatContainer.style.bottom = (this.footerHeight + off) + 'px';
- this.diagramContainer.style.bottom = (this.footerHeight + off + th) + 'px';
-
+
+ if (urlParams['embedInline'] != '1')
+ {
+ this.diagramContainer.style.left = (contLeft + diagContOffset.x) + 'px';
+ this.diagramContainer.style.top = (tmp + diagContOffset.y) + 'px';
+ this.diagramContainer.style.right = fw + 'px';
+ this.diagramContainer.style.bottom = (this.footerHeight + off + th) + 'px';
+ }
+
if (sizeDidChange)
{
this.editor.graph.sizeDidChange();
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 282f0f4a..c5d4954f 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -193,6 +193,7 @@ window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_C
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=require("@electron/remote").app.getLocale(),null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
+"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.proto="json",urlParams.prefetchFonts="1");
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}null==a&&"1"==urlParams.extAuth&&(a="sketch");try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch=
"1",a="min");return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
@@ -200,7 +201,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.5.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.5.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),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]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
@@ -2038,9 +2039,9 @@ Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIwIDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNWMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0wIDJ2M0g1VjVoMTV6bS01IDE0aC01di05aDV2OXpNNSAxMGgzdjlINXYtOXptMTIgOXYtOWgzdjloLTN6Ii8+PC9zdmc+";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=!0;Editor.simpleLabels=!1;
-Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
-Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
-Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
+Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
+Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;
+Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",g),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",g);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,c){var e=new Graph(null,c,null,null,b);e.transparentBackground=!1;var k=e.isCssTransformsSupported,g=this;e.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!g.chromeless||!mxClient.IS_SF)};this.chromeless||(e.isBlankLink=function(b){return!this.isExternalProtocol(b)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
@@ -2057,52 +2058,52 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};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,c,e,k,g,n,t,d,f,l,q){var m=f?57:0,p=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,F=Math.max(1,Math.round((y.width-e-v)/2)),D=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);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=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";F+=y.x;D+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(F,D,e,k);F=g.x;D=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=F+"px";E.style.top=D+"px";E.style.zIndex=
-this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=D+14+"px",n.style.left=F+e+38-m+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=
-n,!q)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){K=!0}),null,mxUtils.bind(this,function(d){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(p=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";F=Math.max(1,Math.round((f.width-e-v)/2));D=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(p,document.body.scrollWidth-v):p;k=Math.min(u,x-v);f=this.getPosition(F,
-D,e,k);F=f.x;D=f.y;E.style.left=F+"px";E.style.top=D+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=F+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,c,e,k,g,n,t,d,f,l,m){var p=f?57:0,q=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,D=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);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=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";D+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(D,C,e,k);D=g.x;C=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=D+"px";E.style.top=C+"px";E.style.zIndex=
+this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=C+14+"px",n.style.left=D+e+38-p+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=
+n,!m)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){K=!0}),null,mxUtils.bind(this,function(d){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(q=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";D=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(q,document.body.scrollWidth-v):q;k=Math.min(u,x-v);f=this.getPosition(D,
+C,e,k);D=f.x;C=f.y;E.style.left=D+"px";E.style.top=C+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=D+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,c,e,k,g,n,t,d,f,l,q){f=null!=f?f:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);m.appendChild(p)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;m.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=q&&q()}),l.className="geBtn",e.appendChild(l));var u=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
-u.className="geBtn";e.appendChild(u);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){u.focus()};m.appendChild(e);this.container=m},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(m.value)/100;isNaN(c)&&(c=1,m.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var p=d.checked?1:parseInt(q.value);isNaN(p)||(k=mxUtils.getScaleForPageCount(p,e,g))}e.getGraphBounds();var n=p=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),p-=c.x*g.width,n-=c.y*g.height):
-f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,p,n,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
+var ErrorDialog=function(b,c,e,k,g,n,t,d,f,l,m){f=null!=f?f:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);p.appendChild(q)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;p.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",e.appendChild(l));var u=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
+u.className="geBtn";e.appendChild(u);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){u.focus()};p.appendChild(e);this.container=p},PrintDialog=function(b,c){this.create(b,c)};
+PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var q=d.checked?1:parseInt(m.value);isNaN(q)||(k=mxUtils.getScaleForPageCount(q,e,g))}e.getGraphBounds();var n=q=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),q-=c.x*g.width,n-=c.y*g.height):
+f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,q,n,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
g.appendChild(f);mxEvent.addListener(f,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(g);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");g.appendChild(f);mxEvent.addListener(f,
-"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(q);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
-function(){l.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";g.appendChild(m);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});p.className="geBtn";g.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";g.appendChild(p);b.editor.cancelFirst||
+"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);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";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";g.appendChild(p);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
+g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});q.className="geBtn";g.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";g.appendChild(q);b.editor.cancelFirst||
g.appendChild(f);k.appendChild(g);t.appendChild(k);n.appendChild(t);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
PrintDialog.createPrintPreview=function(b,c,e,k,g,n,t){c=new mxPrintPreview(b,c,e,k,g,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=q,l.style.backgroundImage="")}function e(){var d=v;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(u.setAttribute("src",d.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=b.editor.graph,g,n,t=document.createElement("table");t.style.width=
+var PageSetupDialog=function(b){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function e(){var d=v;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(u.setAttribute("src",d.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=b.editor.graph,g,n,t=document.createElement("table");t.style.width=
"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");g.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",k.pageFormat);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");g.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var q=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=k.getGridSize();n.appendChild(m);mxEvent.addListener(m,"change",function(){var b=parseInt(m.value);m.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(n);d.appendChild(g);g=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");g.appendChild(n);n=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
-"60px";u.style.padding="4px";var v=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(v=b,e())},v);mxEvent.consume(d)};mxEvent.addListener(p,"click",y);mxEvent.addListener(u,"click",y);e();n.appendChild(u);n.appendChild(p);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";
-b.editor.cancelFirst&&n.appendChild(p);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(m.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,q,v,f.get());d.ignoreColor=k.background==q;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=v?v.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
-n.appendChild(y);b.editor.cancelFirst||n.appendChild(p);g.appendChild(n);d.appendChild(g);t.appendChild(d);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||m!=document.activeElement&&p!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],D?"custom"==l.key&&(d.value=l.key,D=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
-e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",q.style.display="none"):(m.value=e.width/100,p.value=e.height/100,n.setAttribute("checked","checked"),
-d.value="custom",f.style.display="none",q.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.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";n.style.marginRight="6px";f.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var q=document.createElement("div");q.style.marginLeft=
-"4px";q.style.width="210px";q.style.height="24px";var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";q.appendChild(m);mxUtils.write(q," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";q.appendChild(p);mxUtils.write(q," in");f.style.display="none";q.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var F=document.createElement("option");F.setAttribute("value",
-x.key);mxUtils.write(F,x.title);d.appendChild(F)}var D=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(q);var E=e,K=function(b,c){var l=u[d.value];null!=l.format?(m.value=l.format.width/100,p.value=l.format.height/100,q.style.display="none",f.style.display=""):(f.style.display="none",q.style.display="");l=parseFloat(m.value);if(isNaN(l)||0>=l)m.value=e.width/100;l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),
-Math.floor(100*parseFloat(p.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&D||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){n.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(m,"blur",K);mxEvent.addListener(m,"click",K);mxEvent.addListener(p,"blur",K);mxEvent.addListener(p,"click",K);mxEvent.addListener(t,"change",K);mxEvent.addListener(n,
-"change",K);mxEvent.addListener(d,"change",function(b){D="custom"==d.value;K(b,!0)});K();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:m,heightInput:p}};
+mxUtils.write(n,mxResources.get("background")+":");g.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=k.background;c();mxEvent.addListener(l,
+"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=k.getGridSize();n.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(n);d.appendChild(g);g=document.createElement("tr");
+n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");g.appendChild(n);n=document.createElement("td");var q=document.createElement("button");q.className="geBtn";q.style.margin="0px";mxUtils.write(q,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
+"60px";u.style.padding="4px";var v=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(v=b,e())},v);mxEvent.consume(d)};mxEvent.addListener(q,"click",y);mxEvent.addListener(u,"click",y);e();n.appendChild(u);n.appendChild(q);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";
+b.editor.cancelFirst&&n.appendChild(q);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(p.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,v,f.get());d.ignoreColor=k.background==m;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=v?v.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
+n.appendChild(y);b.editor.cancelFirst||n.appendChild(q);g.appendChild(n);d.appendChild(g);t.appendChild(d);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||p!=document.activeElement&&q!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],C?"custom"==l.key&&(d.value=l.key,C=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
+e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(p.value=e.width/100,q.value=e.height/100,n.setAttribute("checked","checked"),
+d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.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";n.style.marginRight="6px";f.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft=
+"4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var D=document.createElement("option");D.setAttribute("value",
+x.key);mxUtils.write(D,x.title);d.appendChild(D)}var C=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var E=e,K=function(b,c){var l=u[d.value];null!=l.format?(p.value=l.format.width/100,q.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.width/100;l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),
+Math.floor(100*parseFloat(q.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&C||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){n.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",K);mxEvent.addListener(p,"click",K);mxEvent.addListener(q,"blur",K);mxEvent.addListener(q,"click",K);mxEvent.addListener(t,"change",K);mxEvent.addListener(n,
+"change",K);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;K(b,!0)});K();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:p,heightInput:q}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,q,m){f=null!=f?f:!0;var p,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";p=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");p.appendChild(u);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=m?m+"px":"180px";var F=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
-"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),F.click());b.stopPropagation();
-b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);p.appendChild(u);if(null!=g||null==t)y.appendChild(p),null!=q&&(u.appendChild(FilenameDialog.createTypeHint(b,x,q)),null!=b.editor.diagramFileTypes&&(p=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),p.appendChild(u),
-u=document.createElement("td"),u.style.whiteSpace="nowrap",p.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=m?m-40+"px":"190px",p.appendChild(u),y.appendChild(p)));null!=t&&(p=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),p.appendChild(u),y.appendChild(p));p=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
-null!=q?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});q.className="geBtn";b.editor.cancelFirst&&u.appendChild(q);null!=d&&(m=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),m.className="geBtn",u.appendChild(m));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&F.click()});u.appendChild(F);b.editor.cancelFirst||u.appendChild(q);p.appendChild(u);y.appendChild(p);
+var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,m,p){f=null!=f?f:!0;var q,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";q=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");q.appendChild(u);var x=document.createElement("input");
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var D=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),D.click());b.stopPropagation();
+b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);q.appendChild(u);if(null!=g||null==t)y.appendChild(q),null!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(q=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),q.appendChild(u),
+u=document.createElement("td"),u.style.whiteSpace="nowrap",q.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=p?p-40+"px":"190px",q.appendChild(u),y.appendChild(q)));null!=t&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),q.appendChild(u),y.appendChild(q));q=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
+null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",u.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&D.click()});u.appendChild(D);b.editor.cancelFirst||u.appendChild(m);q.appendChild(u);y.appendChild(q);
v.appendChild(y);this.container=v};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.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(c)});
@@ -2117,8 +2118,8 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=nul
b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,n=this.view.getBackgroundPageBounds();
-d=n.width;f=n.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,F=n.x+d,D=n.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
-Math.round(n.y+(f+1)*v.height)),new mxPoint(Math.round(F),Math.round(n.y+(f+1)*v.height))]:[new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(D))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+d=n.width;f=n.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,D=n.x+d,C=n.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
+Math.round(n.y+(f+1)*v.height)),new mxPoint(Math.round(D),Math.round(n.y+(f+1)*v.height))]:[new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2127,24 +2128,24 @@ function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.is
this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),f=d.getParent(b),c=this.graph.view.getState(f),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(f)||d.isEdge(f));){var g=this.graph.isCellSelected(f),e=e||g;if(g||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=f;f=d.getParent(f)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var g=k.getGraphBounds;k.getGraphBounds=function(b){var d=g.apply(this,arguments);b=this.backgroundImage;if(null!=b){var f=this.view.translate,c=this.view.scale;d.add(new mxRectangle((f.x+b.x)*c,
(f.y+b.y)*c,b.width*c,b.height*c))}return d}}k.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.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=
function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var n="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var q=g[l],m=q.indexOf("=");if(0<=m){e=q.substring(0,m);var p=q.substring(m+1);null!=c[e]&&"none"==p&&(b.push(p),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",b,"cells",[d.cell]))}}catch(V){this.handleError(V)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var q=function(b,d,f,c,e,g,q){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
-if(q){q=[];for(var G=0;G<b.length;G++)q=q.concat(f.getDescendants(b[G]));b=q}f.beginUpdate();try{for(G=0;G<b.length;G++){var m=b[G],p;if(d)p=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(m),B=null!=v?v.split(";"):[];p=n.slice();for(var u=0;u<B.length;u++){var C=B[u],x=C.indexOf("=");if(0<=x){var y=C.substring(0,x),N=mxUtils.indexOf(p,y);0<=N&&p.splice(N,1);for(q=0;q<l.length;q++){var D=l[q];if(0<=mxUtils.indexOf(D,y))for(var A=0;A<D.length;A++){var E=mxUtils.indexOf(p,D[A]);0<=E&&p.splice(E,
-1)}}}}}var K=f.isEdge(m);q=K?e:c;for(var F=f.getStyle(m),u=0;u<p.length;u++){var y=p[u],Q=q[y];null!=Q&&("shape"!=y||K)&&(!K||g||0>mxUtils.indexOf(t,y))&&(F=mxUtils.setStyle(F,y,Q))}Editor.simpleLabels&&(F=mxUtils.setStyle(mxUtils.setStyle(F,"html",null),"whiteSpace",null));f.setStyle(m,F)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){q(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){q(d.getProperty("cells"),!0)});this.insertHandler=
-q;this.createDivs();this.createUi();this.refresh();var m=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=m,this.menubarContainer.onmousedown=m,this.toolbarContainer.onselectstart=m,this.toolbarContainer.onmousedown=m,this.diagramContainer.onselectstart=m,this.diagramContainer.onmousedown=m,this.sidebarContainer.onselectstart=m,this.sidebarContainer.onmousedown=m,
-this.formatContainer.onselectstart=m,this.formatContainer.onmousedown=m,this.footerContainer.onselectstart=m,this.footerContainer.onmousedown=m,null!=this.tabContainer&&(this.tabContainer.onselectstart=m));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return m(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var p=k.graphHandler.start;k.graphHandler.start=function(){null!=J.hoverIcons&&J.hoverIcons.reset();p.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],p=m.indexOf("=");if(0<=p){e=m.substring(0,p);var q=m.substring(p+1);null!=c[e]&&"none"==q&&(b.push(q),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",b,"cells",[d.cell]))}}catch(ca){this.handleError(ca)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
+if(m){m=[];for(var F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var p=b[F],q;if(d)q=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(p),u=null!=v?v.split(";"):[];q=n.slice();for(var A=0;A<u.length;A++){var I=u[A],x=I.indexOf("=");if(0<=x){var y=I.substring(0,x),N=mxUtils.indexOf(q,y);0<=N&&q.splice(N,1);for(m=0;m<l.length;m++){var C=l[m];if(0<=mxUtils.indexOf(C,y))for(var B=0;B<C.length;B++){var E=mxUtils.indexOf(q,C[B]);0<=E&&q.splice(E,
+1)}}}}}var K=f.isEdge(p);m=K?e:c;for(var D=f.getStyle(p),A=0;A<q.length;A++){var y=q[A],R=m[y];null!=R&&"edgeStyle"!=y&&("shape"!=y||K)&&(!K||g||0>mxUtils.indexOf(t,y))&&(D=mxUtils.setStyle(D,y,R))}Editor.simpleLabels&&(D=mxUtils.setStyle(mxUtils.setStyle(D,"html",null),"whiteSpace",null));f.setStyle(p,D)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),
+!0)});this.insertHandler=m;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=
+p,this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown=p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var q=k.graphHandler.start;k.graphHandler.start=function(){null!=J.hoverIcons&&J.hoverIcons.reset();q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
function(b){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,v=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return u||v.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?
mxEvent.isConsumed(b)||27!=b.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,
-arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var F=k.isZoomWheelEvent;
-k.isZoomWheelEvent=function(){return u||F.apply(this,arguments)};var D=!1,E=null,K=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
-this.toolbar.fontMenu=E;this.toolbar.sizeMenu=K}D=k.cellEditor.isContentEditing();E=b;K=f;L=d}}),J=this,A=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){A.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=J.toolbar&&(J.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),J.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},
-0))};mxEvent.addListener(k.cellEditor.textarea,"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(Q){J.handleError(Q)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var P=
+arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var D=k.isZoomWheelEvent;
+k.isZoomWheelEvent=function(){return u||D.apply(this,arguments)};var C=!1,E=null,K=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
+this.toolbar.fontMenu=E;this.toolbar.sizeMenu=K}C=k.cellEditor.isContentEditing();E=b;K=f;L=d}}),J=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=J.toolbar&&(J.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),J.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},
+0))};mxEvent.addListener(k.cellEditor.textarea,"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(R){J.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(V){}var P=
k.fireMouseEvent;k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();P.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,
-function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=J.hoverIcons&&J.hoverIcons.update(k.view.getState(f[f.length-1]))},0));q(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var q=0;q<e.length&&(l=k.getModel().isVertex(e[q])||l,!(g=k.getModel().isEdge(e[q])||g)||!l);q++);else g=l=!0;for(var e=c.getProperty("keys"),m=c.getProperty("values"),
-q=0;q<e.length;q++){var p=0<=mxUtils.indexOf(d,e[q]);if("strokeColor"!=e[q]||null!=m[q]&&"none"!=m[q])if(0<=mxUtils.indexOf(t,e[q]))g||0<=mxUtils.indexOf(f,e[q])?null==m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]:l&&0<=mxUtils.indexOf(n,e[q])&&(null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q]);else if(0<=mxUtils.indexOf(n,e[q])){if(l||p)null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q];if(g||p||0<=mxUtils.indexOf(f,e[q]))null==
-m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
+function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=J.hoverIcons&&J.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),p=c.getProperty("values"),
+m=0;m<e.length;m++){var q=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=p[m]&&"none"!=p[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]:l&&0<=mxUtils.indexOf(n,e[m])&&(null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m]);else if(0<=mxUtils.indexOf(n,e[m])){if(l||q)null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m];if(g||q||0<=mxUtils.indexOf(f,e[m]))null==
+p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),f=k.getView().getState(k.getSelectionCell());
@@ -2158,16 +2159,16 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,c=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));var e=mxUtils.bind(this,function(){c.hideShapePicker(!0)});b.addListener("wheel",e);b.addListener(mxEvent.ESCAPE,e);b.view.addListener(mxEvent.SCALE,e);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);b.getSelectionModel().addListener(mxEvent.CHANGE,e);b.getModel().addListener(mxEvent.CHANGE,
e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var g=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))g.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,q){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
-for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){q(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){m(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,n=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,n,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(n,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),f,!0);this.centerShapePicker(x,d,k,g,f);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=n.width/2-10,k-=n.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=n.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=n.width+6,k-=n.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=n.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
EditorUi.prototype.showShapePicker=function(b,c,e,k,g,n){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,n),n);null!=b&&(null==this.hoverIcons||n||this.hoverIcons.reset(),n=this.editor.graph,n.popupMenuHandler.hideMenu(),n.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,c,e,k,g,n,t,d){var f=null;if(null!=t&&0<t.length){var l=this,q=this.editor.graph,f=document.createElement("div");g=q.view.getState(e);var m=null==e||null!=g&&q.isTransparentState(g)?null:q.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(f.style.backgroundColor=q.background);q.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=m&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(m,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=q.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);f.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(f)}finally{q.model.endUpdate()}q.setSelectionCell(f);
-q.scrollCellToVisible(f);q.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(q.view.getState(f))}null!=n&&n()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0<t&&(f.style.top=Math.max(q.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(q.container.scrollLeft+q.container.offsetWidth);0<t&&(f.style.left=Math.max(q.container.scrollLeft+22,b-t)+"px")}return f};
+EditorUi.prototype.createShapePicker=function(b,c,e,k,g,n,t,d){var f=null;if(null!=t&&0<t.length){var l=this,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var p=null==e||null!=g&&m.isTransparentState(g)?null:m.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=p&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(p,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=m.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f);
+m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(f))}null!=n&&n()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<t&&(f.style.top=Math.max(m.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<t&&(f.style.left=Math.max(m.container.scrollLeft+22,b-t)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,c){var e=mxUtils.bind(this,function(b,c,e,t){return this.editor.graph.createVertex(null,null,t||"",0,0,c||120,e||60,b,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),
e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
@@ -2182,41 +2183,41 @@ e==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+b+"thindiamond":"g
e?"geSprite geSprite-"+b+"eronetoone":"ERmany"==e?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),e=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));e.setEnabled(c.isEnabled())};
EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},f=c.createCellLookup(e),l=c.cloneCells(e,null,d),g=new mxGraphModel,k=g.getChildAt(g.getRoot(),
-0),p=0;p<l.length;p++){g.add(k,l[p]);var n=c.view.getState(e[p]);if(null!=n){var v=c.getCellGeometry(l[p]);null!=v&&v.relative&&!g.isEdge(e[p])&&null==f[mxObjectIdentity.get(g.getParent(e[p]))]&&(v.offset=null,v.relative=!1,v.x=n.x/n.view.scale-n.view.translate.x,v.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
+0),q=0;q<l.length;q++){g.add(k,l[q]);var n=c.view.getState(e[q]);if(null!=n){var v=c.getCellGeometry(l[q]);null!=v&&v.relative&&!g.isEdge(e[q])&&null==f[mxObjectIdentity.get(g.getParent(e[q]))]&&(v.offset=null,v.relative=!1,v.x=n.x/n.view.scale-n.view.translate.x,v.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.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 b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),q=b.view.translate,k=b.view.scale,G=mxRectangle.fromRectangle(l);
-G.x=G.x/k-q.x;G.y=G.y/k-q.y;G.width/=k;G.height/=k;var q=b.container.scrollTop,m=b.container.scrollLeft,p=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=b.container.offsetWidth-p,p=b.container.offsetHeight-p;d=d?Math.max(.3,Math.min(f||1,n/G.width)):k;f=(n-d*G.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(p-d*G.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<n||l.height<p)b.view.scaleAndTranslate(d,Math.floor(f-
-G.x),Math.floor(v-G.y)),b.container.scrollTop=q*d/k,b.container.scrollLeft=m*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),m=b.view.translate,k=b.view.scale,F=mxRectangle.fromRectangle(l);
+F.x=F.x/k-m.x;F.y=F.y/k-m.y;F.width/=k;F.height/=k;var m=b.container.scrollTop,p=b.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var n=b.container.offsetWidth-q,q=b.container.offsetHeight-q;d=d?Math.max(.3,Math.min(f||1,n/F.width)):k;f=(n-d*F.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(q-d*F.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<n||l.height<q)b.view.scaleAndTranslate(d,Math.floor(f-
+F.x),Math.floor(v-F.y)),b.container.scrollTop=m*d/k,b.container.scrollLeft=p*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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 n=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var t=0,n=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
"8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="36px";b.style.filter="invert(100%)";c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&n(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=n(mxUtils.bind(this,
function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),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 l=n(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();
-mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
-"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");q()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",q)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var p=null,u=null,v=mxUtils.bind(this,function(b){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
+mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
+"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
+n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var q=null,u=null,v=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){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 f=x.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=f.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));f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),
-Editor.layersImage,mxResources.get("layers")),F=b.getModel();F.addListener(mxEvent.CHANGE,function(){x.style.display=1<F.getChildCount(F.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
-"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var D=this.lightboxToolbarActions[m];D.elem=n(D.fn,D.icon,D.tooltip)}null!=g.refreshBtn&&n(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,
+Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
+"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var C=this.lightboxToolbarActions[p];C.elem=n(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&n(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,
function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),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(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var E=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<E&&Math.abs(this.scrollTop-b.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var K=
b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}K.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-
-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),J=b.view.getDrawPane();b.cumulativeZoomFactor=1;var A=null,M=null,P=null,T=null,N=null,Q=function(d){null!=A&&window.clearTimeout(A);window.setTimeout(function(){if(!b.isMouseDown||T)A=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
+c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),J=b.view.getDrawPane();b.cumulativeZoomFactor=1;var B=null,M=null,P=null,V=null,N=null,R=function(d){null!=B&&window.clearTimeout(B);window.setTimeout(function(){if(!b.isMouseDown||V)B=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)),J.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(J.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){J.style.transform="";H.style.transform=""},0)):(J.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
-f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,q=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,q=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,q+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),q*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==q||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=q*(b.cumulativeZoomFactor-1)));null!=N&&J.setAttribute("filter",
-N);b.cumulativeZoomFactor=1;N=T=M=P=A=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},ga=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-ga)){ga=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
+f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,m=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,m=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,m+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),m*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==m||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=m*(b.cumulativeZoomFactor-1)));null!=N&&J.setAttribute("filter",
+N);b.cumulativeZoomFactor=1;N=V=M=P=B=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},ba=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-ba)){ba=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==
N&&""!=J.getAttribute("filter")&&(N=J.getAttribute("filter"),J.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;J.style.transformOrigin=d+"px "+l+"px";J.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
"scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(f?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":M.x+b.container.scrollLeft-d.offsetLeft-b.container.offsetLeft+"px")+" "+(f?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":M.y+b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,
-"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}Q(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=A&&window.clearTimeout(A)},null,function(d){1!=b.cumulativeZoomFactor&&Q(0)});mxEvent.addListener(b.container,"scroll",function(d){null==A||b.isMouseDown||1==b.cumulativeZoomFactor||Q(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));
-if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),T=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),
+"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}R(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=B&&window.clearTimeout(B)},null,function(d){1!=b.cumulativeZoomFactor&&R(0)});mxEvent.addListener(b.container,"scroll",function(d){null==B||b.isMouseDown||1==b.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));
+if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),V=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),
b.container);b.panningHandler.zoomGraph=function(d){b.cumulativeZoomFactor=d.scale;b.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),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 c=urlParams.border,e=60;null!=c&&(e=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,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))};
@@ -2248,10 +2249,10 @@ null!=b.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(b.isCon
this.actions.get("editLink").setEnabled(1==n.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);n=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(n);this.menus.get("insert").setEnabled(n);this.menus.get("direction").setEnabled(n&&c);this.menus.get("align").setEnabled(n&&
c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(n&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(n);this.actions.get("selectEdges").setEnabled(n);this.actions.get("selectAll").setEnabled(n);this.actions.get("selectNone").setEnabled(n);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&(n+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=n+t.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+g+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+20)),c=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",c+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",c+=this.toolbarHeight);0<c&&(c+=1);var n=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,n=Math.max(0,Math.min(e-c-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=n+"px";
+this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=c+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=c+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
+n+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+t.x+"px",this.diagramContainer.style.top=c+t.y+"px",this.diagramContainer.style.right=e+"px",this.diagramContainer.style.bottom=this.footerHeight+k+g+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2260,10 +2261,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var c=document.createElement("div");c.className=b;return c};
-EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=q()&&(f=!0,l=null)}}function n(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var q=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
-mxEvent.getClientY(b));d=q();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=q();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,n)})};
+EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=m()&&(f=!0,l=null)}}function n(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
+mxEvent.getClientY(b));d=m();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=m();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,n)})};
EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,n,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(b,c,e,k,g,n,t,d,f,l,q,m,p){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,n,t,m,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,q||100+20*c,!0,!1,p);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,n,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,n,t,d,f,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,c,e,k,g,n,t,d,f,l,m,p,q){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,n,t,p,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||100+20*c,!0,!1,q);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,n,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,n,t,d,f,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,c,e){null!=this.dialogs&&0<this.dialogs.length&&(null==e||e==this.dialog.container.firstChild)&&(e=this.dialogs.pop(),0==e.close(b,c)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var n=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==n||e.get(n)||(e.put(n,!0),k.push(n))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(n.container,230,g,!0,!1);n.init()};
@@ -2271,7 +2272,7 @@ EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind
EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),g="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=g.lastIndexOf("%3E");
-0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(q){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(q){}}catch(q){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(m){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(m){}}catch(m){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(c){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var c=null;if(null!=b&&0<b.length){var e="<meta "==b.substring(0,6),c=document.createElement("div");c.innerHTML=(e?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(b=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,b==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,b),asHtml=!1));e=e&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=e&&null==e.nextSibling&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==e.nodeName?(b=e.getAttribute("src"),
@@ -2293,7 +2294,7 @@ c=-d:38==b?e=-d:39==b?c=d:40==b&&(e=d),g.currentDx+=c*l,g.currentDy+=e*l,g.check
b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var l=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=l)return l.funct}if(null!=d[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var f=k.connectVertex(k.getSelectionCell(),
d[b.keyCode],k.defaultEdgeLength,b,!0);null!=f&&0<f.length&&(1==f.length&&k.model.isEdge(f[0])?k.setSelectionCell(k.model.getTerminal(f[0],!1)):k.setSelectionCell(f[f.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return f.apply(this,arguments)};g.bindAction=
-mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var l=this,q=g.escape;g.escape=function(b){q.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});g.bindAction(107,!0,"zoomIn");
+mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var l=this,m=g.escape;g.escape=function(b){m.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});g.bindAction(107,!0,"zoomIn");
g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){l.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",
!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),
g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),
@@ -2303,39 +2304,39 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],b=0;b<c.length;b++)null!=c[b]&&null!=c[b].parentNode&&c[b].parentNode.removeChild(c[b])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var b=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var k=0;k<b.length;k++)e=e.replace(new RegExp("&"+b[k][0]+";","g"),"&#"+b[k][1]+";");return c(e)}})();
Date.prototype.toISOString||function(){function b(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var g=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
-arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,q;l<d;)q=g[l],f[l]=k?"undefined"===typeof t?k(q,l):k.call(t,q,l):q,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,m;l<d;)m=g[l],f[l]=k?"undefined"===typeof t?k(m,l):k.call(t,m,l):m,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
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,c,e){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),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,c,e,k,g,n){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),q=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
-g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(g.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(l=m.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(m=this.selectionCellsHandler.getHandler(g.cell),null==m||null==m.getHandleForEvent(e))){var p=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);p.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),m=this.model.getParent(n);if(!this.isCellSelected(m)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(p,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(m,0)!=n||mxUtils.intersects(p,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(p,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
-this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(p,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))n=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,e.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m&&(v=m.getHandleForEvent(e),null!=v&&(m.start(e.getGraphX(),e.getGraphY(),v),m.blockDelayedSelection=!n,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(m=this.getActualStartSize(g.cell),
-(0<m.x||0<m.width)&&mxUtils.intersects(p,new mxRectangle(g.x+(m.x-m.width-1)*k+(0==m.x?g.width:0),g.y,1,g.height))||(0<m.y||0<m.height)&&mxUtils.intersects(p,new mxRectangle(g.x,g.y+(m.y-m.height-1)*k+(0==m.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),m=this.selectionCellsHandler.getHandler(g.cell),null!=m&&(v=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
+g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var p=this.selectionCellsHandler.getHandler(g.cell);null!=p&&null!=p.bends&&0<p.bends.length&&(l=p.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(p=this.selectionCellsHandler.getHandler(g.cell),null==p||null==p.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),p=this.model.getParent(n);if(!this.isCellSelected(p)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))n=this.selectionCellsHandler.isHandled(p),this.selectCellForEvent(p,e.getEvent()),p=this.selectionCellsHandler.getHandler(p),null!=p&&(v=p.getHandleForEvent(e),null!=v&&(p.start(e.getGraphX(),e.getGraphY(),v),p.blockDelayedSelection=!n,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(p=this.getActualStartSize(g.cell),
+(0<p.x||0<p.width)&&mxUtils.intersects(q,new mxRectangle(g.x+(p.x-p.width-1)*k+(0==p.x?g.width:0),g.y,1,g.height))||(0<p.y||0<p.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(p.y-p.height-1)*k+(0==p.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),p=this.selectionCellsHandler.getHandler(g.cell),null!=p&&(v=mxEvent.CUSTOM_HANDLE-p.customHandles.length+1,p.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
d){},mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
-var m=this.view.getEdgeStyle(e),p=m==mxEdgeStyle.EntityRelation;q||l!=mxEvent.LABEL_HANDLE||(g=l);if(p&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!p||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)p||g==mxEvent.LABEL_HANDLE||(p=e.absolutePoints,null!=p&&(null==m&&null==g||m==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
-t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,p[0].x,p[0].y)?g=0:mxUtils.contains(g,p[p.length-1].x,p[p.length-1].y)?g=k.bends.length-1:null!=m&&(2==p.length||3==p.length&&(0==Math.round(p[0].x-p[1].x)&&0==Math.round(p[1].x-p[2].x)||0==Math.round(p[0].y-p[1].y)&&0==Math.round(p[1].y-p[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==m?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());q=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),p=e.absolutePoints,null!=p)if(null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,p[0].x,p[0].y)||mxUtils.contains(g,p[p.length-1].x,p[p.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<p.length-1&&0<=g&&(k=0==Math.round(p[g].x-p[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
-new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(p=this.model.getParent(e.cell),m=this.model.getParent(p),!this.isCellSelected(m)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(p,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(m,0)!=p||mxUtils.intersects(g,
-new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(p=e;null==k&&null!=p&&(this.isTableCell(p.cell)||this.isTableRow(p.cell)||this.isTable(p.cell));){if(this.isSwimlane(p.cell)){var m=this.getActualStartSize(p.cell),n=this.view.scale;(0<m.x||0<m.width)&&mxUtils.intersects(g,new mxRectangle(p.x+(m.x-m.width-1)*n+(0==m.x?p.width*n:0),p.y,1,p.height))?k="col-resize":(0<m.y||0<m.height)&&mxUtils.intersects(g,new mxRectangle(p.x,p.y+(m.y-m.height-1)*n+(0==m.y?p.height:0),p.width,1))&&(k=
-"row-resize")}p=this.view.getState(this.model.getParent(p.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};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(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=m.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),k=0;k<l.width;k++)d.push(new mxRectangle(((l.x+k)*e+c.x)*g,(l.y*f+c.y)*g,e*g,f*g));for(k=1;k<l.height;k++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+k)*f+c.y)*g,e*g,f*g));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=p.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var g=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
+var p=this.view.getEdgeStyle(e),q=p==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(q&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!q||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)q||g==mxEvent.LABEL_HANDLE||(q=e.absolutePoints,null!=q&&(null==p&&null==g||p==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
+t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,q[0].x,q[0].y)?g=0:mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y)?g=k.bends.length-1:null!=p&&(2==q.length||3==q.length&&(0==Math.round(q[0].x-q[1].x)&&0==Math.round(q[1].x-q[2].x)||0==Math.round(q[0].y-q[1].y)&&0==Math.round(q[1].y-q[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==p?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
+k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),q=e.absolutePoints,null!=q)if(null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,q[0].x,q[0].y)||mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<q.length-1&&0<=g&&(k=0==Math.round(q[g].x-q[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
+new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(q=this.model.getParent(e.cell),p=this.model.getParent(q),!this.isCellSelected(p)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(q,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(p,0)!=q||mxUtils.intersects(g,
+new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(q=e;null==k&&null!=q&&(this.isTableCell(q.cell)||this.isTableRow(q.cell)||this.isTable(q.cell));){if(this.isSwimlane(q.cell)){var p=this.getActualStartSize(q.cell),n=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(g,new mxRectangle(q.x+(p.x-p.width-1)*n+(0==p.x?q.width*n:0),q.y,1,q.height))?k="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(g,new mxRectangle(q.x,q.y+(p.y-p.height-1)*n+(0==p.y?q.height:0),q.width,1))&&(k=
+"row-resize")}q=this.view.getState(this.model.getParent(q.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};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(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var b=p.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),k=0;k<l.width;k++)d.push(new mxRectangle(((l.x+k)*e+c.x)*g,(l.y*f+c.y)*g,e*g,f*g));for(k=1;k<l.height;k++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+k)*f+c.y)*g,e*g,f*g));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=q.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var g=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==g||f.get(g)||(f.put(g,!0),c.push(g))}return c};var u=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,F=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;F.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var D=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var K=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return K.apply(this,
+u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;D.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var K=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return K.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=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=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
-this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var A=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return A.apply(this,arguments)};this.selectRegion=function(b,d){var f=mxEvent.isAltDown(d)?b:null,f=this.getCells(b.x,
+this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var B=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return B.apply(this,arguments)};this.selectRegion=function(b,d){var f=mxEvent.isAltDown(d)?b:null,f=this.getCells(b.x,
b.y,b.width,b.height,null,null,f,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);if(this.isToggleEvent(d))for(var c=0;c<f.length;c++)this.selectCellForEvent(f[c],d);else this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),
"locked","0"))return!0;b=this.model.getParent(b)}return!1};var P=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();P=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),c=d.getProperty("cell");null==c?(f=mxUtils.convertPoint(this.container,
mxEvent.getClientX(f),mxEvent.getClientY(f)),v.start(f.x,f.y)):null!=P?this.addSelectionCells(P):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);P=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(b){b=T.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
+mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var V=this.updateMouseEvent;this.updateMouseEvent=function(b){b=V.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}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="Viewer does not support full SVG 1.1";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(" ");
@@ -2362,9 +2363,9 @@ c&&this.graph.isCustomLink(c)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return b&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var f=this.view.getState(b[d]);this.mergeStyle(f.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
c,d){if(null!=b){var f={},e;for(e in b){var g=b[e];null!=g&&(f[e]=!0,null==c[e]&&d?c[e]=g:c[e]!=g&&delete c[e])}for(e in c)f[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var f=this.model.getChildAt(b,d);if(this.isCellEditable(f)){b=f;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var f=b[d],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==c[g]&&f==mxConstants.NONE&&
-(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],p=b[d[g]];k==p||null==k&&p==mxConstants.NONE||this.setCellStyles(d[g],p,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],q=b[d[g]];k==q||null==k&&q==mxConstants.NONE||this.setCellStyles(d[g],q,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,f,e,g){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,f,e,g){f=null!=f?f:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
-null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),q=this.getScaledCellAt(b,c,k,f,e,g);if(null!=q)return q;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(q=this.view.getState(k),null!=q&&(null==g||!g(q,b,c))&&this.intersects(q,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
+null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),m=this.getScaledCellAt(b,c,k,f,e,g);if(null!=m)return m;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(m=this.view.getState(k),null!=m&&(null==g||!g(m,b,c))&&this.intersects(m,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(b){for(var c=this.getCellGeometry(b);null!=c&&c.relative;)b=this.getModel().getParent(b),c=this.getCellGeometry(b);return b};Graph.prototype.isPart=function(b){return"1"==mxUtils.getValue(this.getCurrentCellStyle(b),"part","0")||this.isTableCell(b)||this.isTableRow(b)};Graph.prototype.getCompositeParent=function(b){for(;this.isPart(b);){var c=this.model.getParent(b);
if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],f=0;f<c.length;f++)b(c[f])||d.push(c[f]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,d=this.graph.currentScale,
b=new mxRectangle((b.x+c.x)*d,(b.y+c.y)*d,b.width*d,b.height*d);return b};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(c){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=
@@ -2383,7 +2384,7 @@ mxUtils.getValue(e,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSp
k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var n=0;n<k.length;n++)g[k[n].nodeName]=k[n].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),n=0;n<g.length;n++)null!=g[n]&&null!=g[n].node&&c.push(g[n].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var g=this.view.getState(b[k]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&e.push(this.createVertexWipeAnimation(g,c)))}return e};
-Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var q=g*l,m=1;m<n;m++)if(q<=k[m-1]){f.push(new mxPoint(e[m-1].x+(e[m].x-e[m-1].x)*q/k[m-1],e[m-1].y+(e[m].y-e[m-1].y)*q/k[m-1]));break}else q-=k[m-1],f.push(e[m]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var m=g*l,p=1;p<n;p++)if(m<=k[p-1]){f.push(new mxPoint(e[p-1].x+(e[p].x-e[p-1].x)*m/k[p-1],e[p-1].y+(e[p].y-e[p-1].y)*m/k[p-1]));break}else m-=k[p-1],f.push(e[p]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=e,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var n=k/g;c||(n=1-n);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*n,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,n=0,t=mxUtils.bind(this,function(){if(n==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(n,e);n++}),g=window.setInterval(t,k);t()};
@@ -2397,29 +2398,29 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(b){var c=null;"date"==b?c=(new Date).toLocaleDateString():"time"==b?c=(new Date).toLocaleTimeString():"timestamp"==b?c=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),c=this.formatDate(new Date,b));return c};
Graph.prototype.formatDate=function(b,c,e){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 k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),q=b[d+"Month"](),m=b[d+"FullYear"](),p=b[d+"Hours"](),u=b[d+"Minutes"](),v=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:q+1,mm:t(q+1),mmm:k.i18n.monthNames[q],mmmm:k.i18n.monthNames[q+
-12],yy:String(m).slice(2),yyyy:m,h:p%12||12,hh:t(p%12||12),H:p,HH:t(p),M:u,MM:t(u),s:v,ss:t(v),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
+/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),m=b[d+"Month"](),p=b[d+"FullYear"](),q=b[d+"Hours"](),u=b[d+"Minutes"](),v=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
+12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:t(q%12||12),H:q,HH:t(q),M:u,MM:t(u),s:v,ss:t(v),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
b.length-1)})};Graph.prototype.getLayerForCells=function(b){var c=null;if(0<b.length){for(c=b[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var e=1;e<b.length;e++)if(!this.model.isAncestor(c,b[e])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),n=0;n<g;n++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
-"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"hideIt":"show",[f]));var q=document.createElement("img");q.setAttribute("draggable","false");q.setAttribute("align","absmiddle");q.setAttribute("border","0");q.style.position="relative";q.style.width="16px";q.style.padding="0px 6px 0 4px";c&&(q.style.filter="invert(100%)",q.style.top="-2px");l.appendChild(q);mxUtils.write(l,f);e.appendChild(l);
+Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),n=0;n<g;n++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
+"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"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";c&&(m.style.filter="invert(100%)",m.style.top="-2px");l.appendChild(m);mxUtils.write(l,f);e.appendChild(l);
mxEvent.addListener(l,"click",function(){k.setVisible(g,!k.isVisible(g));d();null!=b&&b(g)});d()})(k.getChildAt(k.root,n));return e};
Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=n.substring(1);else{var d=n.substring(1,n.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:n));g=match.index+n.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,c,e,k,g,n,t,d){n=n?n:!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),l=f?b:this.getCompositeParent(b),q=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(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(q.x+=l.geometry.width/2,q.y-=e):c==
-mxConstants.DIRECTION_SOUTH?(q.x+=l.geometry.width/2,q.y+=l.geometry.height+e):(q.x=c==mxConstants.DIRECTION_WEST?q.x-e:q.x+(l.geometry.width+e),q.y+=l.geometry.height/2);var m=this.view.getState(this.model.getParent(b));e=this.view.scale;var p=this.view.translate,l=p.x*e,p=p.y*e;null!=m&&this.model.isVertex(m.cell)&&(l=m.x,p=m.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(q.x+=b.parent.geometry.x,q.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+q.x*e,p+q.y*e)).grow(40*e);n=null!=n?
-this.getCells(0,0,0,0,null,null,n,null,!0):null;var m=this.view.getState(b),u=null,v=null;if(null!=n){n=n.reverse();for(var y=0;y<n.length;y++)if(!this.isCellLocked(n[y])&&!this.model.isEdge(n[y])&&n[y]!=b)if(!this.model.isAncestor(b,n[y])&&this.isContainer(n[y])&&(null==u||n[y]==this.model.getParent(b)))u=n[y];else if(null==v&&this.isCellConnectable(n[y])&&!this.model.isAncestor(n[y],b)&&!this.isSwimlane(n[y])){var x=this.view.getState(n[y]);null==m||null==x||mxUtils.intersects(m,x)||(v=n[y])}}var F=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;F&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?q.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=b.geometry.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-b.geometry.width/2:q.x+b.geometry.width/2);var D=[],E=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==E&&F){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?q.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=l.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-l.width/2:q.x+l.width/2),l.x=q.x-l.width/2,l.y=q.y-l.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),v=null):F&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var m=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&F||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var p=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=m.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==m.parent&&(p=e.parent.getIndex(e),this.model.add(e.parent,m,p))}null==v&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(p=b.parent.getIndex(b),this.model.add(b.parent,
-E,p));null!=m&&D.push(m);null==v&&null!=E&&D.push(E);null==E&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}}if(null!=d)d(D);else return D});if(null==t||null!=E||!F||null==v&&f)return g(E);t(l+q.x*e,p+q.y*e,g)};
+Graph.prototype.connectVertex=function(b,c,e,k,g,n,t,d){n=n?n:!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),l=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(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
+mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var p=this.view.getState(this.model.getParent(b));e=this.view.scale;var q=this.view.translate,l=q.x*e,q=q.y*e;null!=p&&this.model.isVertex(p.cell)&&(l=p.x,q=p.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+m.x*e,q+m.y*e)).grow(40*e);n=null!=n?
+this.getCells(0,0,0,0,null,null,n,null,!0):null;var p=this.view.getState(b),u=null,v=null;if(null!=n){n=n.reverse();for(var y=0;y<n.length;y++)if(!this.isCellLocked(n[y])&&!this.model.isEdge(n[y])&&n[y]!=b)if(!this.model.isAncestor(b,n[y])&&this.isContainer(n[y])&&(null==u||n[y]==this.model.getParent(b)))u=n[y];else if(null==v&&this.isCellConnectable(n[y])&&!this.model.isAncestor(n[y],b)&&!this.isSwimlane(n[y])){var x=this.view.getState(n[y]);null==p||null==x||mxUtils.intersects(p,x)||(v=n[y])}}var D=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;D&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],E=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==E&&D){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),v=null):D&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var p=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&D||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=p.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==p.parent&&(q=e.parent.getIndex(e),this.model.add(e.parent,p,q))}null==v&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(q=b.parent.getIndex(b),this.model.add(b.parent,
+E,q));null!=p&&C.push(p);null==v&&null!=E&&C.push(E);null==E&&null!=p&&p.geometry.setTerminalPoint(m,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=E||!D||null==v&&f)return g(E);t(l+m.x*e,q+m.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}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};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var e=this.model.getParent(b);this.model.isVertex(e)&&this.isCellCollapsed(b)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(b,c,e){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(b));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,c){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var q=this.model.getParent(e[n]),m=this.layoutManager.getLayout(q);
-null==m?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,q,f,l):null!=g&&mxEvent.isAltDown(g)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(q,m,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var m=this.model.getParent(e[n]),p=this.layoutManager.getLayout(m);
+null==p?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var n=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=n&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var n=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=n&&(n=n.clone(),c.horizontal?n.width+=e+Math.min(0,t.width/this.view.scale-n.width):n.height+=k+Math.min(0,t.height/this.view.scale-n.height),this.model.setGeometry(b,
n));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2473,30 +2474,30 @@ Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,n,t,d,f){e=null
g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=n;g.geometry.height+=n;t=this.createVertex(null,null,"",0,n,c*e+n,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",n,0,e,k,d),c,e,0));
return 1<b?(t.geometry.y=k+n,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",n,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var q=this.getCellGeometry(n);null!=q&&(e||(e=b==t[t.length-1]),e&&(q=q.clone(),q.height+=c,k.setGeometry(n,q)));
+Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(n);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(n,m)));
null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),n=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(n,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),q=t[b],m=this.getCellGeometry(q);null!=m&&(m=m.clone(),m.width+=c,null!=m.alternateBounds&&(m.alternateBounds.width+=c),k.setGeometry(q,m));b<t.length-1&&(q=t[b+1],m=this.getCellGeometry(q),null!=m&&(m=m.clone(),
-m.x+=c,e||(m.width-=c,null!=m.alternateBounds&&(m.alternateBounds.width-=c)),k.setGeometry(q,m)))}if(d||e){var p=this.getCellGeometry(n);null!=p&&(p=p.clone(),p.width+=c,k.setGeometry(n,p))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),n=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(n,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],p=this.getCellGeometry(m);null!=p&&(p=p.clone(),p.width+=c,null!=p.alternateBounds&&(p.alternateBounds.width+=c),k.setGeometry(m,p));b<t.length-1&&(m=t[b+1],p=this.getCellGeometry(m),null!=p&&(p=p.clone(),
+p.x+=c,e||(p.width-=c,null!=p.alternateBounds&&(p.alternateBounds.width-=c)),k.setGeometry(m,p)))}if(d||e){var q=this.getCellGeometry(n);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(n,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};
TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),n=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*n/g,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k,g){var n=this.graph.getModel(),t=n.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var d=null,f=b.x,l=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var q=0;q<t.length;q++){var m=this.graph.getCellGeometry(t[q]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[q],m.width=c[q+1]-m.x,q==t.length-1&&q<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=f,f+=m.width,q==t.length-1?m.width=k-b.x-b.width-l:l+=m.width),m.alternateBounds=
-new mxRectangle(0,0,m.width,m.height),n.setGeometry(t[q],m));var p=!0;null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=m.alternateBounds?m.alternateBounds.width:m.width,p=!1,d.colspan--);var u=g[q];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=m.alternateBounds?m.alternateBounds.height:m.height,p=!1,u.rowspan--);n.setVisible(t[q],p);p=this.graph.getCurrentCellStyle(t[q],!0);m={style:p,cell:t[q],geo:m};if(null!=p){if(null==d||1>d.colspan)m.colspan=
-parseInt(p.colspan||0),d=m;if(null==u||1>u.rowspan)m.rowspan=parseInt(p.rowspan||0),g[q]=m}}return l};
-TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,q=t.getChildCells(b,!0),m=this.getSize(q,!1);if(0<f&&0<l&&0<q.length&&0<m){if(g){var p=this.graph.getCellGeometry(q[q.length-
-1]);null!=p&&(p=p.clone(),p.height=f-m+p.height,t.setGeometry(q[q.length-1],p))}for(var u=n?null:this.getRowLayout(q[0],l),v=[],y=c.y,x=0;x<q.length;x++)p=this.graph.getCellGeometry(q[x]),null!=p&&(p=p.clone(),p.x=c.x,p.width=l,p.y=Math.round(y),y=g||k?y+p.height:y+p.height/m*f,p.height=Math.round(y)-p.y,t.setGeometry(q[x],p)),d=Math.max(d,this.layoutRow(q[x],u,p.height,l,v));k&&f<m&&(e=e.clone(),e.height=y+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+
+TableLayout.prototype.layoutRow=function(b,c,e,k,g){var n=this.graph.getModel(),t=n.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var d=null,f=b.x,l=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var m=0;m<t.length;m++){var p=this.graph.getCellGeometry(t[m]);null!=p&&(p=p.clone(),p.y=b.y,p.height=e-b.y-b.height,null!=c?(p.x=c[m],p.width=c[m+1]-p.x,m==t.length-1&&m<c.length-2&&(p.width=k-p.x-b.x-b.width)):(p.x=f,f+=p.width,m==t.length-1?p.width=k-b.x-b.width-l:l+=p.width),p.alternateBounds=
+new mxRectangle(0,0,p.width,p.height),n.setGeometry(t[m],p));var q=!0;null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=p.alternateBounds?p.alternateBounds.width:p.width,q=!1,d.colspan--);var u=g[m];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=p.alternateBounds?p.alternateBounds.height:p.height,q=!1,u.rowspan--);n.setVisible(t[m],q);q=this.graph.getCurrentCellStyle(t[m],!0);p={style:q,cell:t[m],geo:p};if(null!=q){if(null==d||1>d.colspan)p.colspan=
+parseInt(q.colspan||0),d=p;if(null==u||1>u.rowspan)p.rowspan=parseInt(q.rowspan||0),g[m]=p}}return l};
+TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),p=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<p){if(g){var q=this.graph.getCellGeometry(m[m.length-
+1]);null!=q&&(q=q.clone(),q.height=f-p+q.height,t.setGeometry(m[m.length-1],q))}for(var u=n?null:this.getRowLayout(m[0],l),v=[],y=c.y,x=0;x<m.length;x++)q=this.graph.getCellGeometry(m[x]),null!=q&&(q=q.clone(),q.x=c.x,q.width=l,q.y=Math.round(y),y=g||k?y+q.height:y+q.height/p*f,q.height=Math.round(y)-q.y,t.setGeometry(m[x],q)),d=Math.max(d,this.layoutRow(m[x],u,q.height,l,v));k&&f<p&&(e=e.clone(),e.height=y+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+
c.x+Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var f=this.getState(b);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=c.apply(this,
arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.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 b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var g=new mxPoint(f,e);g.type=d;c.push(g);g=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==g||g.type!=
-d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],q=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,q.x,q.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],J=H.absolutePoints;if(null!=J&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<J.length-1;H++){for(var A=J[H+1],M=J[H],t=J[H+2];H<J.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,A.x,A.y)<1*this.scale*this.scale;)A=
-t,H++,t=J[H+2];t=mxUtils.intersection(q.x,q.y,k.x,k.y,M.x,M.y,A.x,A.y);if(null!=t&&(Math.abs(t.x-q.x)>g||Math.abs(t.y-q.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-A.x)>g||Math.abs(t.y-A.y)>g)){A=t.x-q.x;M=t.y-q.y;t={distSq:A*A+M*M,x:t.x,y:t.y};for(A=0;A<n.length;A++)if(n[A].distSq>t.distSq){n.splice(A,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)f=e(1,n[H].x,
+d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],m=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],J=H.absolutePoints;if(null!=J&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<J.length-1;H++){for(var B=J[H+1],M=J[H],t=J[H+2];H<J.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
+t,H++,t=J[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,B.x,B.y);if(null!=t&&(Math.abs(t.x-m.x)>g||Math.abs(t.y-m.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-B.x)>g||Math.abs(t.y-B.y)>g)){B=t.x-m.x;M=t.y-m.y;t={distSq:B*B+M*M,x:t.x,y:t.y};for(B=0;B<n.length;B++)if(n[B].distSq>t.distSq){n.splice(B,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)f=e(1,n[H].x,
n[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var n=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){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)n.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,q=null,m=[],p=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],J=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?J=d[0]:t==this.state.routedPoints.length-1&&(J=d[d.length-1]);var A=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-J.x,M=M.y/this.scale-J.y,H=H*H+M*M;null==p&&(p=new mxPoint(J.x-k.x,J.y-k.y),
-q=Math.sqrt(p.x*p.x+p.y*p.y),0<q?(p.x=p.x*e/q,p.y=p.y*e/q):p=null);H>e*e&&0<q&&(H=k.x-J.x,M=k.y-J.y,H=H*H+M*M,H>e*e&&(A=new mxPoint(J.x-p.x,J.y-p.y),H=new mxPoint(J.x+p.x,J.y+p.y),m.push(A),this.addPoints(b,m,f,c,!1,null,l),m=0>Math.round(p.x)||0==Math.round(p.x)&&0>=Math.round(p.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(A.x-p.y*m,A.y+p.x*m),b.lineTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(A.x+p.y*m,A.y-p.x*m),b.lineTo(A.x-p.y*m,A.y+p.x*m),b.moveTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x+p.y*
-m,H.y-p.x*m),b.moveTo(H.x,H.y)):"arc"==g?(m*=1.3,b.curveTo(A.x-p.y*m,A.y+p.x*m,H.x-p.y*m,H.y+p.x*m,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),m=[H],A=!0))}else p=null;A||(m.push(J),k=J)}this.addPoints(b,m,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var m=Math.cos(-k),p=Math.sin(-k),g=mxUtils.getRotatedPoint(g,m,p,q);m=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);m+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,m);0!=k&&(m=Math.cos(k),p=Math.sin(k),g=mxUtils.getRotatedPoint(g,m,p,q));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,m=null,p=[],q=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],J=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?J=d[0]:t==this.state.routedPoints.length-1&&(J=d[d.length-1]);var B=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-J.x,M=M.y/this.scale-J.y,H=H*H+M*M;null==q&&(q=new mxPoint(J.x-k.x,J.y-k.y),
+m=Math.sqrt(q.x*q.x+q.y*q.y),0<m?(q.x=q.x*e/m,q.y=q.y*e/m):q=null);H>e*e&&0<m&&(H=k.x-J.x,M=k.y-J.y,H=H*H+M*M,H>e*e&&(B=new mxPoint(J.x-q.x,J.y-q.y),H=new mxPoint(J.x+q.x,J.y+q.y),p.push(B),this.addPoints(b,p,f,c,!1,null,l),p=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(B.x-q.y*p,B.y+q.x*p),b.lineTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(B.x+q.y*p,B.y-q.x*p),b.lineTo(B.x-q.y*p,B.y+q.x*p),b.moveTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x+q.y*
+p,H.y-q.x*p),b.moveTo(H.x,H.y)):"arc"==g?(p*=1.3,b.curveTo(B.x-q.y*p,B.y+q.x*p,H.x-q.y*p,H.y+q.x*p,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),p=[H],B=!0))}else q=null;B||(p.push(J),k=J)}this.addPoints(b,p,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var p=Math.cos(-k),q=Math.sin(-k),g=mxUtils.getRotatedPoint(g,p,q,m);p=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);p+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,p);0!=k&&(p=Math.cos(k),q=Math.sin(k),g=mxUtils.getRotatedPoint(g,p,q,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
b[g]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)f=l,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(v){null!=window.console&&console.log("Error in shape: "+v)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
@@ -2517,28 +2518,28 @@ function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandl
";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,f){this.model.beginUpdate();
try{for(var c=0;c<f.length;c++)if(this.model.isVertex(f[c])||this.model.isEdge(f[c])){this.setCellStyles(b,null,[f[c]]);var e=this.getCellStyle(f[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,d,[f[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():
null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var f=0;f<b.length;f++){var c=b[f];d[mxObjectIdentity.get(c)]=c.getId();for(var e=this.model.getChildCount(c),g=0;g<e;g++)this.createCellLookup([this.model.getChildAt(c,g)],d)}return d};Graph.prototype.createCellMapping=function(b,d,f){f=null!=f?f:{};for(var c in b){var e=d[c];null==f[e]&&(f[e]=b[c].getId()||"")}return f};Graph.prototype.importGraphModel=function(b,
-d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=k){var q=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)m=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=m&&(b=b.concat(m));else{var m=g.getChildren(k[0]);null!=
-m&&(b=this.moveCells(m,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,q,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&(d=this.snap(d),f=this.snap(f));var p=this.getBoundingBoxFromGeometry(b,!0);null!=p&&this.moveCells(b,d-p.x,f-p.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],
-!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var q=this.view.getState(b[e]);if(null!=q){var m=this.getCellGeometry(f[e]);null!=m&&m.relative&&!this.model.isEdge(b[e])&&null==c.get(this.model.getParent(b[e]))&&(m.offset=null,m.relative=!1,m.x=q.x/q.view.scale-q.view.translate.x,m.y=q.y/q.view.scale-q.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=
+d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=k){var m=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)p=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=p&&(b=b.concat(p));else{var p=g.getChildren(k[0]);null!=
+p&&(b=this.moveCells(p,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,m,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&(d=this.snap(d),f=this.snap(f));var q=this.getBoundingBoxFromGeometry(b,!0);null!=q&&this.moveCells(b,d-q.x,f-q.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],
+!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var p=this.getCellGeometry(f[e]);null!=p&&p.relative&&!this.model.isEdge(b[e])&&null==c.get(this.model.getParent(b[e]))&&(p.offset=null,p.relative=!1,p.x=m.x/m.view.scale-m.view.translate.x,p.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=
function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,q){null==q&&(q=this.model.getParent(b),this.isTable(q)||this.isTableRow(q))&&(q=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,q]);this.model.setValue(c,"");var m=this.getChildCells(c,!0);for(d=0;d<m.length;d++){var p=this.getCellGeometry(m[d]);null!=p&&p.relative&&0<p.x&&this.model.remove(m[d])}var G=this.getChildCells(b,!0);for(d=0;d<G.length;d++)p=this.getCellGeometry(G[d]),null!=p&&p.relative&&
-0>=p.x&&this.model.remove(G[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[b]);var aa=this.model.getTerminal(c,!1);if(null!=aa){var v=this.getCurrentCellStyle(aa);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,
+Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,m]);this.model.setValue(c,"");var p=this.getChildCells(c,!0);for(d=0;d<p.length;d++){var q=this.getCellGeometry(p[d]);null!=q&&q.relative&&0<q.x&&this.model.remove(p[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)q=this.getCellGeometry(F[d]),null!=q&&q.relative&&
+0>=q.x&&this.model.remove(F[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[b]);var O=this.model.getTerminal(c,!1);if(null!=O){var v=this.getCurrentCellStyle(O);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,
null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&
-b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],m=0;m<b.length;m++)this.isTable(b[m])?k=k.concat(this.model.getChildCells(b[m],!0).reverse()):k.push(b[m]);b=k}this.model.beginUpdate();try{k=[];for(m=0;m<
-b.length;m++)if(null!=e&&this.isTableRow(b[m])){var p=this.model.getParent(b[m]),G=this.getCellGeometry(b[m]);this.isTable(p)&&k.push(p);if(null!=p&&null!=G&&this.isTable(p)&&this.isTable(e)&&(c||p!=e)){if(!c){var v=this.getCellGeometry(p);null!=v&&(v=v.clone(),v.height-=G.height,this.model.setGeometry(p,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=G.height,this.model.setGeometry(e,v));var aa=this.model.getChildCells(e,!0);if(0<aa.length){b[m]=c?this.cloneCell(b[m]):b[m];var u=this.model.getChildCells(b[m],
-!0),n=this.model.getChildCells(aa[0],!0),B=n.length-u.length;if(0<B)for(var C=0;C<B;C++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(b[m],x))}else if(0>B)for(C=0;C>B;C--)this.model.remove(u[u.length+C-1]);u=this.model.getChildCells(b[m],!0);for(C=0;C<n.length;C++){var ra=this.getCellGeometry(n[C]),t=this.getCellGeometry(u[C]);null!=ra&&null!=t&&(t=t.clone(),t.width=ra.width,this.model.setGeometry(u[C],t))}}}}for(var ua=q.apply(this,arguments),m=0;m<k.length;m++)!c&&this.model.contains(k[m])&&
-0==this.model.getChildCount(k[m])&&this.model.remove(k[m]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),ua)}finally{this.model.endUpdate()}return ua};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,
-g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,q=0;q<l.length;q++)0<=mxUtils.indexOf(b,l[q])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=m.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=
+b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],p=0;p<b.length;p++)this.isTable(b[p])?k=k.concat(this.model.getChildCells(b[p],!0).reverse()):k.push(b[p]);b=k}this.model.beginUpdate();try{k=[];for(p=0;p<
+b.length;p++)if(null!=e&&this.isTableRow(b[p])){var q=this.model.getParent(b[p]),F=this.getCellGeometry(b[p]);this.isTable(q)&&k.push(q);if(null!=q&&null!=F&&this.isTable(q)&&this.isTable(e)&&(c||q!=e)){if(!c){var O=this.getCellGeometry(q);null!=O&&(O=O.clone(),O.height-=F.height,this.model.setGeometry(q,O))}O=this.getCellGeometry(e);null!=O&&(O=O.clone(),O.height+=F.height,this.model.setGeometry(e,O));var v=this.model.getChildCells(e,!0);if(0<v.length){b[p]=c?this.cloneCell(b[p]):b[p];var u=this.model.getChildCells(b[p],
+!0),n=this.model.getChildCells(v[0],!0),A=n.length-u.length;if(0<A)for(var x=0;x<A;x++){var I=this.cloneCell(u[u.length-1]);null!=I&&(I.value="",this.model.add(b[p],I))}else if(0>A)for(x=0;x>A;x--)this.model.remove(u[u.length+x-1]);u=this.model.getChildCells(b[p],!0);for(x=0;x<n.length;x++){var Y=this.getCellGeometry(n[x]),t=this.getCellGeometry(u[x]);null!=Y&&null!=t&&(t=t.clone(),t.width=Y.width,this.model.setGeometry(u[x],t))}}}}for(var xa=m.apply(this,arguments),p=0;p<k.length;p++)!c&&this.model.contains(k[p])&&
+0==this.model.getChildCount(k[p])&&this.model.remove(k[p]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),xa)}finally{this.model.endUpdate()}return xa};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,
+g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,l[m])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=p.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=
function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var g=e[f];c.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,
-3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(va){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=
+3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(pa){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=
function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};
Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,g=!0,l=0;l<d.length&&g;l++)e=e&&this.isTable(d[l]),g=g&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||g||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,
arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&
-(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),p=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(p,!0);f.setGeometry(g,
-m);var G=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=G){var aa=null!=v?this.getConnectionConstraint(G,v,!0):null,n=null!=u?this.getConnectionConstraint(G,u,!1):null;this.setConnectionConstraint(g,l,!0,n);this.setConnectionConstraint(g,k,!1,aa);var B=mxUtils.getValue(G.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(G.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/2-m.height/2;m.y+=m.height/2-m.width/2;var C=m.width;m.width=m.height;m.height=C;f.setGeometry(g,m)}var x=this.view.getState(g);if(null!=x){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],ra=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,ra)+(d?-1:1),t.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var p=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||
-this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}p.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=
+(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var p=m.getTerminalPoint(!0),q=m.getTerminalPoint(!1);m.setTerminalPoint(p,!1);m.setTerminalPoint(q,!0);f.setGeometry(g,
+m);var F=this.view.getState(g),v=this.view.getState(l),O=this.view.getState(k);if(null!=F){var u=null!=v?this.getConnectionConstraint(F,v,!0):null,n=null!=O?this.getConnectionConstraint(F,O,!1):null;this.setConnectionConstraint(g,l,!0,n);this.setConnectionConstraint(g,k,!1,u);var A=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+A,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/2-m.height/2;m.y+=m.height/2-m.width/2;var x=m.width;m.width=m.height;m.height=x;f.setGeometry(g,m)}var I=this.view.getState(g);if(null!=I){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Y=mxUtils.getValue(I.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
+this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,Y)+(d?-1:1),t.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var q=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&
+(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}q.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=
function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);
f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=0;c<f.length;c++)d(f[c])};Graph.prototype.updateLabelElements=function(b,d,f){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var g=this.convertValueToString(b[e]);if(null!=g&&0<g.length){c.innerHTML=g;for(var l=c.getElementsByTagName(null!=f?f:"*"),k=0;k<l.length;k++)d(l[k]);
c.innerHTML!=g&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,f){d=Graph.zapGremlins(d);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var g=b.value.cloneNode(!0);
@@ -2560,31 +2561,31 @@ mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var f=Math.
d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),
"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=
l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",
-function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var p=this.moveCells([m[f]],e,e,!1)[0];g.push(p);if(d)c.add(q,m[f]);else{var G=
-q.getIndex(b[f]);c.add(q,m[f],G+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(q);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(q,u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),
+function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var p=c.getParent(b[f]);if(null!=p){var q=this.moveCells([m[f]],e,e,!1)[0];g.push(q);if(d)c.add(p,m[f]);else{var F=
+p.getIndex(b[f]);c.add(p,m[f],F+1)}if(this.isTable(p)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(p);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(p,u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),
e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);
document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=
this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):
-k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var q=this.view.getState(this.model.getParent(f[g].cell)),p=this.getCellGeometry(f[g].cell),c=c+m;null!=p&&null!=q&&(p=p.clone(),b?p.x=Math.round(c-p.width/2)-q.origin.x:p.y=Math.round(c-p.height/2)-q.origin.y,this.getModel().setGeometry(f[g].cell,p))}}finally{this.getModel().endUpdate()}}}return d};
+k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var p=this.view.getState(this.model.getParent(f[g].cell)),q=this.getCellGeometry(f[g].cell),c=c+m;null!=q&&null!=p&&(q=q.clone(),b?q.x=Math.round(c-q.width/2)-p.origin.x:q.y=Math.round(c-q.height/2)-p.origin.y,this.getModel().setGeometry(f[g].cell,q))}}finally{this.getModel().endUpdate()}}}return d};
Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=
-function(b,d,f,c,e,g,l,k,m,q,p,G,v,u){var n=null;if(null!=u)for(n=new mxDictionary,p=0;p<u.length;p++)n.put(u[p],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;g=null!=g?g:!0;l=null!=l?l:!0;var B="page"==v?this.view.getBackgroundPageBounds():g&&null==n||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),C=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&B.add(new mxRectangle((this.view.translate.x+
-this.backgroundImage.x)*C,(this.view.translate.y+this.backgroundImage.y)*C,this.backgroundImage.width*C,this.backgroundImage.height*C));if(null==B)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/C;var y=Math.max(1,Math.ceil(B.width*b)+2*f)+(q?5:0),I=Math.max(1,Math.ceil(B.height*b)+2*f)+(q?5:0);t.setAttribute("version","1.1");t.setAttribute("width",y+"px");t.setAttribute("height",I+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+y+" "+I);x.appendChild(t);var D=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");t.appendChild(D);var V=
-this.createSvgCanvas(D);V.foOffset=e?-.5:0;V.textOffset=e?-.5:0;V.imageOffset=e?-.5:0;V.translate(Math.floor(f/d-B.x/C),Math.floor(f/d-B.y/C));var aa=document.createElement("div"),U=V.getAlternateText;V.getAlternateText=function(b,d,f,c,e,g,l,k,m,q,p,z,pa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(aa.innerHTML=g,g=mxUtils.extractTextWithWhitespace(aa.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),sa=[],Ta=0,G=0;(0==Wa||Ta<Wa)&&G<g.length;){var Ua=g.charCodeAt(G);
-if(10==Ua||13==Ua){if(0<Ta)break}else sa.push(g.charAt(G)),255>Ua&&Ta++;G++}sa.length<g.length&&1<g.length-sa.length&&(g=mxUtils.trim(sa.join(""))+"...");return g}catch(gb){return U.apply(this,arguments)}else return U.apply(this,arguments)};var A=this.backgroundImage;if(null!=A){d=C/d;var N=this.view.translate,ra=new mxRectangle((A.x+N.x)*d,(A.y+N.y)*d,A.width*d,A.height*d);mxUtils.intersects(B,ra)&&V.image(A.x+N.x,A.y+N.y,A.width,A.height,A.src,!0)}V.scale(b);V.textEnabled=l;k=null!=k?k:this.createSvgImageExport();
-var E=k.drawCellState,ba=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=ba.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=n?n.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==n||c)&&null!=e;)c=null!=n?n.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==n||c)&&E.apply(this,
-arguments)};k.drawState(this.getView().getState(this.model.root),V);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(V,t);return t}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
+function(b,d,f,c,e,g,l,k,m,p,q,F,v,u){var n=null;if(null!=u)for(n=new mxDictionary,q=0;q<u.length;q++)n.put(u[q],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;g=null!=g?g:!0;l=null!=l?l:!0;var A="page"==v?this.view.getBackgroundPageBounds():g&&null==n||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),x=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&A.add(new mxRectangle((this.view.translate.x+
+this.backgroundImage.x)*x,(this.view.translate.y+this.backgroundImage.y)*x,this.backgroundImage.width*x,this.backgroundImage.height*x));if(null==A)throw Error(mxResources.get("drawingEmpty"));var I=mxUtils.createXmlDocument(),t=null!=I.createElementNS?I.createElementNS(mxConstants.NS_SVG,"svg"):I.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==I.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",
+mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/x;var O=Math.max(1,Math.ceil(A.width*b)+2*f)+(p?5:0),G=Math.max(1,Math.ceil(A.height*b)+2*f)+(p?5:0);t.setAttribute("version","1.1");t.setAttribute("width",O+"px");t.setAttribute("height",G+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+O+" "+G);I.appendChild(t);var y=null!=I.createElementNS?I.createElementNS(mxConstants.NS_SVG,"g"):I.createElement("g");t.appendChild(y);var B=
+this.createSvgCanvas(y);B.foOffset=e?-.5:0;B.textOffset=e?-.5:0;B.imageOffset=e?-.5:0;B.translate(Math.floor(f/d-A.x/x),Math.floor(f/d-A.y/x));var C=document.createElement("div"),S=B.getAlternateText;B.getAlternateText=function(b,d,f,c,e,g,l,k,m,p,q,z,qa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(C.innerHTML=g,g=mxUtils.extractTextWithWhitespace(C.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ta=[],Ta=0,F=0;(0==Wa||Ta<Wa)&&F<g.length;){var Ua=g.charCodeAt(F);
+if(10==Ua||13==Ua){if(0<Ta)break}else ta.push(g.charAt(F)),255>Ua&&Ta++;F++}ta.length<g.length&&1<g.length-ta.length&&(g=mxUtils.trim(ta.join(""))+"...");return g}catch(gb){return S.apply(this,arguments)}else return S.apply(this,arguments)};var Y=this.backgroundImage;if(null!=Y){d=x/d;var N=this.view.translate,ca=new mxRectangle((Y.x+N.x)*d,(Y.y+N.y)*d,Y.width*d,Y.height*d);mxUtils.intersects(A,ca)&&B.image(Y.x+N.x,Y.y+N.y,Y.width,Y.height,Y.src,!0)}B.scale(b);B.textEnabled=l;k=null!=k?k:this.createSvgImageExport();
+var E=k.drawCellState,X=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=X.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=n?n.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==n||c)&&null!=e;)c=null!=n?n.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==n||c)&&E.apply(this,
+arguments)};k.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(B,t);return t}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=b.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x",
"50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(g);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};
Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=
b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,f){for(;null!=b&&b.nodeName!=d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=
function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var g=
this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=g&&null!=l&&(l=l.clone(),l.height-=g.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var g=
-f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<l.length;g++){var m=f.getChildCells(l[g],!0)[e],q=f.cloneCell(m,!1),p=this.getCellGeometry(q);q.value=null;if(null!=p){var k=p.width,G=this.getCellGeometry(l[g]);null!=G&&(p.height=G.height)}f.add(l[g],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&
+f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<l.length;g++){var m=f.getChildCells(l[g],!0)[e],p=f.cloneCell(m,!1),q=this.getCellGeometry(p);p.value=null;if(null!=q){var k=q.width,F=this.getCellGeometry(l[g]);null!=F&&(q.height=F.height)}f.add(l[g],p,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&
(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.deleteLane=function(b){var d=this.getModel();d.beginUpdate();try{var f=null,f="stackLayout"==this.getCurrentCellStyle(b).childLayout?b:d.getParent(b),c=d.getChildCells(f,!0);0==c.length?d.remove(f):(f==b&&(b=c[c.length-1]),d.remove(b))}finally{d.endUpdate()}};Graph.prototype.insertLane=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=null,e=b;if("stackLayout"==this.getCurrentCellStyle(e).childLayout)var c=
e,g=f.getChildCells(c,!0),e=g[d?0:g.length-1];else c=f.getParent(e);var l=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;f.add(c,e,l+(d?0:1))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=
-this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var p=this.getCellGeometry(c);null!=p&&(p=p.clone(),p.height+=m.height,f.setGeometry(c,p))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,
-!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();
+this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var p=this.getCellGeometry(b);null!=p&&(p.height=m.height)}f.add(c,e,k+(d?0:1));var q=this.getCellGeometry(c);null!=q&&(q=q.clone(),q.height+=m.height,f.setGeometry(c,q))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,
+!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=b,d.setGeometry(f,p))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();
try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);null!=g&&(b=g.height);var l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(f,l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var f=b.tBodies[0],c=f.rows[0].cells,e=0,g=0;g<c.length;g++)var l=c[g].getAttribute("colspan"),
e=e+(null!=l?parseInt(l):1);f=f.insertRow(d);for(g=0;g<e;g++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var f=b.tHead;if(null!=f)for(var c=0;c<f.rows.length;c++){var e=document.createElement("th");f.rows[c].appendChild(e);mxUtils.br(e)}f=b.tBodies[0];for(c=0;c<f.rows.length;c++)e=f.rows[c].insertCell(d),mxUtils.br(e);return f.rows[0].cells[0<=d?d:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
function(b,d){if(0<=d)for(var f=b.tBodies[0].rows,c=0;c<f.length;c++)f[c].cells.length>d&&f[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var f=document.createElement("div");f.innerHTML=b;b=document.createDocumentFragment();for(var c;c=f.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};
@@ -2595,13 +2596,13 @@ f=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,
function(){if(!this.isEditing()){var d=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(e.getX()+d.x+1,e.getY()+d.y+1,b,e.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[b,e,g])})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};
mxCellEditor.prototype.isTextSelected=function(){var b="";window.getSelection?b=window.getSelection():document.getSelection?b=document.getSelection():document.selection&&(b=document.selection.createRange().text);return""!=b};mxCellEditor.prototype.insertTab=function(b){var d=this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));f.insertNode(b);
f.setStartAfter(b);f.setEndAfter(b);d.removeAllRanges();d.addRange(f)};mxCellEditor.prototype.alignText=function(b,d){var f=null!=d&&mxEvent.isShiftDown(d);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=
-function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(oa){}};
+function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ua){}};
var v=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,
"color",b.text,d);v.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?
-x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);F.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;
+x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);D.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;
for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=b.firstChild;null!=d;){var f=d.nextSibling;c(d);d=f}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,
-"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=d(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]>")?f(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);if(null!=b){var d=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(d?
m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&
mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push("underline");(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+
@@ -2613,32 +2614,32 @@ mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_AL
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);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("+f+","+
f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",E.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(b.cell,d);"1"==mxUtils.getValue(b.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=
mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();
-K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(aa){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{L.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(O){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{L.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(b){var d=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=b.cell.geometry&&0<b.cell.geometry.width)||0==mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(b){var d=this.graph.getView().scale;return new mxRectangle(0,
0,null==b.text?30:b.text.size*d+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(b,d){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(d.getEvent)};mxGraphView.prototype.formatUnitText=function(b){return b?c(b,this.unit):b};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));
var f=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/e-f.y);e=this.graph.view.unit;this.hint.innerHTML=c(d,e)+", "+c(f,e);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 H=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){H.apply(this,arguments);var f=this.graph.getCellStyle(b);if(null==f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),"stackLayout"==f.childLayout)){var g=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack",
"1"),l=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+l.y+l.height+2*g:e.width=d.width+l.x+l.width+2*g;this.graph.model.setGeometry(c,e)}}};var J=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=J.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],g=0;g<d.length;g++){var l=d[g];this.graph.isTableCell(l)?b(c.getParent(c.getParent(l))):
-this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var A=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=A.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var M=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(b){var d=M.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=
+this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=B.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var M=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(b){var d=M.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=
-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var b=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+b.x/2,this.bounds.y+this.rotationHandleVSpacing-b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.graph.isRecursiveVertexResize(b)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&
!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var P=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return P.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 T=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return T.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
-function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var ga=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=ga.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),q=null!=m.alternateBounds?
-m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=q.width*d.view.scale,l.height=q.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+1]:null,m=null!=m?d.getCellGeometry(m):null,p=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var G=0;l.shape.node.parentNode.insertBefore(l.shape.node,
-l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==G?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(q.width+G)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var v=!1;l.setPosition=function(b,d,f){G=Math.max(Graph.minTableColumnWidth-
-q.width,d.x-b.x-q.width);v=mxEvent.isShiftDown(f.getEvent());null==p||v||(G=Math.min(G,p.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=G)d.setTableColumnWidth(this.state.cell,G,v);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}G=0};l.positionChanged=function(){};l.reset=function(){G=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,
+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 V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
+function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var R=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return R.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var ba=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=ba.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),p=null!=m.alternateBounds?
+m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=p.width*d.view.scale,l.height=p.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+1]:null,m=null!=m?d.getCellGeometry(m):null,q=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var F=0;l.shape.node.parentNode.insertBefore(l.shape.node,
+l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==F?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(p.width+F)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var v=!1;l.setPosition=function(b,d,f){F=Math.max(Graph.minTableColumnWidth-
+p.width,d.x-b.x-p.width);v=mxEvent.isShiftDown(f.getEvent());null==q||v||(F=Math.min(F,q.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=F)d.setTableColumnWidth(this.state.cell,F,v);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}F=0};l.positionChanged=function(){};l.reset=function(){F=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,
1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};
-f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var G=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){G.apply(this,
+f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){F.apply(this,
arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=
[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height="4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,
b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,
-d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var C=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);
+d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var I=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);
f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,g=e.getCenterX(),l=e.getCenterY();if(Math.abs(this.state.x-g)<e.width/2||Math.abs(this.state.y-l)<e.height/2||Math.abs(this.state.x+this.state.width-g)<e.width/2||Math.abs(this.state.y+this.state.height-l)<e.height/
-2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=C.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){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{d=
+2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=I.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){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{d=
this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/d),f)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.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 B=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){B.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(b,d){U.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,g=this.graph.view.scale,l=this.roundLength(f.x/g-e.x),e=this.roundLength(f.y/g-e.y),g=this.graph.view.unit;this.hint.innerHTML=c(l,g)+", "+c(e,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
+mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var A=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){A.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 S=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+function(b,d){S.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,g=this.graph.view.scale,l=this.roundLength(f.x/g-e.x),e=this.roundLength(f.y/g-e.y),g=this.graph.view.unit;this.hint.innerHTML=c(l,g)+", "+c(e,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(l=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*l.x)+"%, "+Math.round(100*l.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=
mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",
@@ -2649,64 +2650,64 @@ Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototy
HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);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(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.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(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var I=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){I.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<
+function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var G=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){G.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<
this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&
mxEvent.isShiftDown(b.getEvent())&&mxEvent.isAltDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,g=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,g=(this.currentX-c)/this.graph.view.scale,
-l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);
-null!=m&&null!=q&&(q=q.clone(),q.translate(g,l),this.graph.model.setGeometry(k[f],q))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-
+l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),p=this.graph.getCellGeometry(k[f]);
+null!=m&&null!=p&&(p=p.clone(),p.translate(g,l),this.graph.model.setGeometry(k[f],p))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-
f,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(g)>l)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<
this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-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)),d.consume()}};var ba=mxRubberband.prototype.reset;
-mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ba.apply(this,arguments)};var V=(new Date).getTime(),qa=0,ma=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ma.apply(this,arguments);f!=this.currentTerminalState?(V=(new Date).getTime(),qa=0):qa=(new Date).getTime()-V;this.currentTerminalState=f};var ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=
-function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<qa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,
-c,f):null,f=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return na.apply(this,arguments)};var Y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),
-null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return Y.apply(this,arguments)};var ka=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=ka.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var la=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),
-f=d.getParent(b.cell),c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):la.apply(this,arguments)};var ca=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ca.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var R=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){R.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 Z=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){Z.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 W=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){W.apply(this,arguments);var b=!1;null!=
-this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
+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)),d.consume()}};var X=mxRubberband.prototype.reset;
+mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);X.apply(this,arguments)};var ca=(new Date).getTime(),ma=0,fa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){fa.apply(this,arguments);f!=this.currentTerminalState?(ca=(new Date).getTime(),ma=0):ma=(new Date).getTime()-ca;this.currentTerminalState=f};var na=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=
+function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ma||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&na.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,
+c,f):null,f=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ka=mxVertexHandler.prototype.createSizerShape;
+mxVertexHandler.prototype.createSizerShape=function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ka.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),
+null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return oa.apply(this,arguments)};var Z=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=Z.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var la=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),
+f=d.getParent(b.cell),c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):la.apply(this,arguments)};var aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&aa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var T=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){T.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 ra=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){ra.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 Q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Q.apply(this,arguments);var b=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
this.cornerHandles.push(f)}}var c=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(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=d||null!=f&&0<f.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.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
-[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;
+[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(sa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;
mxEdgeHandler.prototype.init=function(){da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=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(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;
-mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ta=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
+mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var wa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
-for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].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":"");ta.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].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":"");wa.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/
-2+Editor.hintOffset)+"px")};var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){S.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
+2+Editor.hintOffset)+"px")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].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 ea=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ea.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var ha=mxEdgeHandler.prototype.reset;
-mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var O=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){O.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(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function q(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}
-function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function F(){mxActor.call(this)}function D(){mxActor.call(this)}function E(){mxActor.call(this)}function K(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function p(){mxActor.call(this)}function q(){mxCylinder.call(this)}
+function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function E(){mxActor.call(this)}function K(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function J(){mxRectangleShape.call(this)}
-function A(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function Q(){mxCylinder.call(this)}function ga(){mxShape.call(this)}function G(){mxShape.call(this)}function C(){mxEllipse.call(this)}function B(){mxShape.call(this)}function U(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function V(){mxShape.call(this)}function qa(){mxShape.call(this)}
-function ma(){mxShape.call(this)}function ja(){mxShape.call(this)}function na(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function ka(){mxRectangleShape.call(this)}function la(){mxDoubleEllipse.call(this)}function ca(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function Z(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function ta(){mxActor.call(this)}
-function S(){mxActor.call(this)}function ea(){mxActor.call(this)}function ha(){mxActor.call(this)}function O(){mxActor.call(this)}function aa(){mxActor.call(this)}function ra(){mxActor.call(this)}function ua(){mxActor.call(this)}function oa(){mxActor.call(this)}function xa(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ha(){mxRhombus.call(this)}function Ia(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}
-function Ja(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function Ea(){mxActor.call(this)}function za(){mxActor.call(this)}function X(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)}function Na(b,d,f,c,e,g,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
-e-l,z.y-g-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
+function B(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function F(){mxShape.call(this)}function I(){mxEllipse.call(this)}function A(){mxShape.call(this)}function S(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function X(){mxShape.call(this)}function ca(){mxShape.call(this)}function ma(){mxShape.call(this)}
+function fa(){mxShape.call(this)}function na(){mxShape.call(this)}function ka(){mxCylinder.call(this)}function oa(){mxCylinder.call(this)}function Z(){mxRectangleShape.call(this)}function la(){mxDoubleEllipse.call(this)}function aa(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function ra(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function wa(){mxActor.call(this)}
+function U(){mxActor.call(this)}function ea(){mxActor.call(this)}function ha(){mxActor.call(this)}function ja(){mxActor.call(this)}function O(){mxActor.call(this)}function Y(){mxActor.call(this)}function xa(){mxActor.call(this)}function ua(){mxActor.call(this)}function sa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function Ba(){mxRhombus.call(this)}function Ca(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}
+function Ja(){mxEllipse.call(this)}function za(){mxActor.call(this)}function Ga(){mxActor.call(this)}function Aa(){mxActor.call(this)}function W(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function ya(){mxConnector.call(this)}function Na(b,d,f,c,e,g,l,k,m,p){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
+e-l,z.y-g-l,2*l,2*l);p?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=g,g=l;b.rotate(-this.getShapeRotation(),z,g,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,g=z.getActualStartSize(this.state.cell),
-l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),pa="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),sa=[{y:null!=m?m.y+m.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),q={y:0,cells:z.model.getChildCells(l[k],!0)};sa.push(q);null!=m&&(q.y=m.y+m.height,b.begin(),b.moveTo(d+g.x,f+m.y),b.lineTo(d+c-g.width,f+m.y),b.end(),b.stroke())}if(pa)for(c=
-z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(pa=l=0;pa<sa.length;pa++)q=sa[pa],null!=q&&(z.model.isVisible(q.cells[k])?l=q.y:(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+q.y),l=0));b.lineTo(d+m.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),qa="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),ta=[{y:null!=m?m.y+m.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),p={y:0,cells:z.model.getChildCells(l[k],!0)};ta.push(p);null!=m&&(p.y=m.y+m.height,b.begin(),b.moveTo(d+g.x,f+m.y),b.lineTo(d+c-g.width,f+m.y),b.end(),b.stroke())}if(qa)for(c=
+z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(qa=l=0;qa<ta.length;qa++)p=ta[qa],null!=p&&(z.model.isVisible(p.cells[k])?l=p.y:(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+p.y),l=0));b.lineTo(d+m.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),
0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
-"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Ka=Math.tan(mxUtils.toRadians(30)),Ga=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
-f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Ka);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ga);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ga)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
-function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Ka));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ga)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ga)*d),b.lineTo(.5*d,(1-Ga)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ga),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ga)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
+"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Ka=Math.tan(mxUtils.toRadians(30)),Ia=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
+f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Ka);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ia);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ia)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
+function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Ka));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ia)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ia)*d),b.lineTo(.5*d,(1-Ia)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ia),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ia)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,
"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);
b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,
-z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(q,mxCylinder);q.prototype.size=15;q.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
-(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",q);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
-2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.arcSize=.1;p.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
+(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
+2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",p);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,k);d=Math.min(c-k,d);g||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,
-0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",p);p.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
+0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==
mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);g||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,
@@ -2715,13 +2716,13 @@ null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("u
d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=
-mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
-"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};p.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
-"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(F,mxActor);F.prototype.size=.2;F.prototype.fixedSize=20;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=
-function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",F);mxUtils.extend(D,
-mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
-0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",D);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,
+"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
+function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",D);mxUtils.extend(C,
+mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
+0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",C);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,
e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",K);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=
d};L.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)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};L.prototype.arcTo=function(b,d,f,c,e,g,l){this.originalArcTo.apply(this.canvas,
arguments);this.lastX=g;this.lastY=l};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;return}var g=Math.round(z/10),l=this.defaultVariation;5>g&&(g=5,l/=3);for(var k=f(b-this.lastX)*c/g,f=f(d-this.lastY)*e/g,c=c/z,e=e/z,z=0;z<g;z++){var m=(Math.random()-
@@ -2733,128 +2734,128 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this
mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=
mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=z?Math.max(0,Math.min(c,g)):c*Math.max(0,Math.min(1,g));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
100,g=Math.max(g,Math.min(c*z,e*z)));g=Math.round(g);b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.moveTo(d+c-g,f);b.lineTo(d+c-g,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",H);mxUtils.extend(J,mxRectangleShape);J.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};J.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",
-J);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+J);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+l),e-f),new mxPoint(g,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
-A);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,
+B);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,
0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var g=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+g);b.lineTo(d+c/2,
-f+e-g);b.moveTo(d+g,f+e/2);b.lineTo(d+c-g,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(b,d,f,c,e){var g=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+g);b.lineTo(d+c/2,
+f+e-g);b.moveTo(d+g,f+e/2);b.lineTo(d+c-g,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",V);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var g=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=z){var l=this.style["symbol"+g+"Align"],
-k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],q=this.style["symbol"+g+"Height"],p=this.style["symbol"+g+"Spacing"]||0,G=this.style["symbol"+g+"VSpacing"]||p,pa=this.style["symbol"+g+"ArcSpacing"];null!=pa&&(pa*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),p+=pa,G+=pa);var pa=d,sa=f,pa=l==mxConstants.ALIGN_CENTER?pa+(c-m)/2:l==mxConstants.ALIGN_RIGHT?pa+(c-m-p):pa+p,sa=k==mxConstants.ALIGN_MIDDLE?sa+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?sa+(e-q-G):sa+G;b.save();
-l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,pa,sa,m,q);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(Q,mxCylinder);Q.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",Q);mxUtils.extend(ga,mxShape);ga.prototype.paintBackground=
-function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",ga);mxUtils.extend(G,mxShape);G.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};G.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
-b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",G);mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",C);mxUtils.extend(B,mxShape);B.prototype.paintVertexShape=
-function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",B);mxUtils.extend(U,mxShape);U.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};U.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};U.prototype.paintForeground=
-function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(I,mxRectangleShape);I.prototype.size=40;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};I.prototype.paintBackground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,g):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=I&&(z=new z,z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,g),b.restore()));g<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+g),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};I.prototype.paintForeground=
-function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",I);mxUtils.extend(ba,mxShape);ba.prototype.width=60;ba.prototype.height=30;ba.prototype.corner=10;ba.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};ba.prototype.paintBackground=function(b,d,f,c,e){var g=this.corner,z=Math.min(c,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,l-1.5*g));b.lineTo(d+Math.max(0,z-g),f+l);b.lineTo(d,f+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",ba);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),
-b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=I.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],p=this.style["symbol"+g+"Height"],q=this.style["symbol"+g+"Spacing"]||0,F=this.style["symbol"+g+"VSpacing"]||q,qa=this.style["symbol"+g+"ArcSpacing"];null!=qa&&(qa*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),q+=qa,F+=qa);var qa=d,ta=f,qa=l==mxConstants.ALIGN_CENTER?qa+(c-m)/2:l==mxConstants.ALIGN_RIGHT?qa+(c-m-q):qa+q,ta=k==mxConstants.ALIGN_MIDDLE?ta+(e-p)/2:k==mxConstants.ALIGN_BOTTOM?ta+(e-p-F):ta+F;b.save();
+l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,qa,ta,m,p);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
+function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};F.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
+b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",F);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",I);mxUtils.extend(A,mxShape);A.prototype.paintVertexShape=
+function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",A);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};S.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};S.prototype.paintForeground=
+function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};G.prototype.paintBackground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,g):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=G&&(z=new z,z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,g),b.restore()));g<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+g),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};G.prototype.paintForeground=
+function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",G);mxUtils.extend(X,mxShape);X.prototype.width=60;X.prototype.height=30;X.prototype.corner=10;X.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};X.prototype.paintBackground=function(b,d,f,c,e){var g=this.corner,z=Math.min(c,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,l-1.5*g));b.lineTo(d+Math.max(0,z-g),f+l);b.lineTo(d,f+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",X);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),
+b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=G.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),
-new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",A.prototype.size))*d.view.scale))),d.style),
-d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?F.prototype.fixedSize:F.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?
+new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",B.prototype.size))*d.view.scale))),d.style),
+d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?D.prototype.fixedSize:D.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?
(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",
-mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?D.prototype.fixedSize:D.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):
m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,
-"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
-g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(q,z+
-e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
-m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
-e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);b.fillAndStroke();
-b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",V);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-g)/2-l,g+
-l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ma,mxShape);ma.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ma);mxUtils.extend(ja,mxShape);ja.prototype.inset=2;ja.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
-this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ja);mxUtils.extend(na,mxCylinder);na.prototype.jettyWidth=20;na.prototype.jettyHeight=10;na.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
-f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",na);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;
-Y.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=.3*e-d/2,k=.7*e-d/2;g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,
-z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintForeground=function(b,d,f,c,e){var g=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+g,f),new mxPoint(d+c,f+l),new mxPoint(d+g,f+e),new mxPoint(d,f+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
-ka);mxUtils.extend(la,mxDoubleEllipse);la.prototype.outerStroke=!0;la.prototype.paintVertexShape=function(b,d,f,c,e){var g=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+g,f+g,c-2*g,e-2*g),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",la);mxUtils.extend(ca,la);ca.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ca);mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=4;R.prototype.isOpenEnded=
-function(){return!0};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};R.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",R);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=10;Z.prototype.defaultArrowWidth=20;Z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Z.prototype.getEndArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Z);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",W);mxUtils.extend(da,mxRectangleShape);da.prototype.dx=20;da.prototype.dy=20;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var l=mxUtils.getValue(this.style,
+"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(p,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(p,z+
+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
+m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(p,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);
+b.fillAndStroke();b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.inset=2;ma.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-
+g)/2-l,g+l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ma);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",fa);mxUtils.extend(na,mxShape);na.prototype.inset=2;na.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
+this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",na);mxUtils.extend(ka,mxCylinder);ka.prototype.jettyWidth=20;ka.prototype.jettyHeight=10;ka.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
+f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",ka);mxUtils.extend(oa,mxCylinder);oa.prototype.jettyWidth=32;oa.prototype.jettyHeight=
+12;oa.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=.3*e-d/2,k=.7*e-d/2;g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,
+z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",oa);mxUtils.extend(Z,mxRectangleShape);Z.prototype.paintForeground=function(b,d,f,c,e){var g=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+g,f),new mxPoint(d+c,f+l),new mxPoint(d+g,f+e),new mxPoint(d,f+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
+Z);mxUtils.extend(la,mxDoubleEllipse);la.prototype.outerStroke=!0;la.prototype.paintVertexShape=function(b,d,f,c,e){var g=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+g,f+g,c-2*g,e-2*g),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",la);mxUtils.extend(aa,la);aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",aa);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=
+function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=10;ra.prototype.defaultArrowWidth=20;ra.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ra.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ra);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",Q);mxUtils.extend(da,mxRectangleShape);da.prototype.dx=20;da.prototype.dy=20;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var l=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(c*l,e*l));l=Math.max(g,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(d,f+g);b.lineTo(d+c,f+g);b.end();b.stroke();b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",da);mxUtils.extend(ia,mxActor);ia.prototype.dx=20;ia.prototype.dy=
20;ia.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,g,!0);b.end()};
-mxCellRenderer.registerShape("corner",ia);mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",ta);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=20;S.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("tee",S);mxUtils.extend(ea,mxActor);ea.prototype.arrowWidth=.3;ea.prototype.arrowSize=.2;ea.prototype.redrawPath=
+mxCellRenderer.registerShape("corner",ia);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",wa);mxUtils.extend(U,mxActor);U.prototype.dx=20;U.prototype.dy=20;U.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("tee",U);mxUtils.extend(ea,mxActor);ea.prototype.arrowWidth=.3;ea.prototype.arrowSize=.2;ea.prototype.redrawPath=
function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-g)/2;var g=f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(0,g)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("singleArrow",
ea);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ea.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ea.prototype.arrowSize))));f=(e-g)/2;var g=f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),
-new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(d,g),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",aa);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",
-ra);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",
-ua);mxUtils.extend(oa,mxActor);oa.prototype.size=.375;oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",
-oa);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",xa);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);
-b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",Aa);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",va);mxUtils.extend(Ha,mxRhombus);Ha.prototype.paintVertexShape=
-function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",Ha);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",
-Ia);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){var g=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,g);b.lineTo(d+10,g-5);b.moveTo(d,g);b.lineTo(d+10,g+5);b.moveTo(d,g);b.lineTo(d+c,g);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,g);b.lineTo(d+c-10,g-5);b.moveTo(d+c,g);b.lineTo(d+c-10,g+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);
+new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(d,g),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(ja,mxActor);ja.prototype.size=.1;ja.prototype.fixedSize=20;ja.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",ja);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",
+Y);mxUtils.extend(xa,mxActor);xa.prototype.size=20;xa.prototype.isRoundable=function(){return!0};xa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",
+xa);mxUtils.extend(ua,mxActor);ua.prototype.size=.375;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",
+ua);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",sa);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);
+b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(Ba,mxRhombus);Ba.prototype.paintVertexShape=
+function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",
+Ca);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(b,d,f,c,e){var g=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,g);b.lineTo(d+10,g-5);b.moveTo(d,g);b.lineTo(d+10,g+5);b.moveTo(d,g);b.lineTo(d+c,g);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,g);b.lineTo(d+c-10,g-5);b.moveTo(d+c,g);b.lineTo(d+c-10,g+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);
if(null!=this.style){var g=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=g;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,
-"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};
-mxCellRenderer.registerShape("lineEllipse",Ja);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",ya);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.2;Ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-g)/2;f=d+g;var l=(c-
-g)/2,g=l+g;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(g,0);b.lineTo(g,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(g,f);b.lineTo(g,e);b.lineTo(l,e);b.lineTo(l,f);b.lineTo(0,f);b.close();b.end()};mxCellRenderer.registerShape("cross",Ea);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/
-2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",za);mxUtils.extend(X,mxActor);X.prototype.cst={RECT2:"mxgraph.basic.rect"};X.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",
+"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};
+mxCellRenderer.registerShape("lineEllipse",Ja);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",za);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.2;Ga.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-g)/2;f=d+g;var l=(c-
+g)/2,g=l+g;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(g,0);b.lineTo(g,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(g,f);b.lineTo(g,e);b.lineTo(l,e);b.lineTo(l,f);b.lineTo(0,f);b.close();b.end()};mxCellRenderer.registerShape("cross",Ga);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.25;Aa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/
+2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Aa);mxUtils.extend(W,mxActor);W.prototype.cst={RECT2:"mxgraph.basic.rect"};W.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"}]}];X.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};X.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=g&&g.rectOutline?g.rectOutline:
-mxUtils.getValue(this.style,"rectOutline",this.rectOutline),p=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),G=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,p)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),n=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),B=g&&g.bottom?g.bottom:
-mxUtils.getValue(this.style,"bottom",!0),C=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),y=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),I=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),D=g&&g.fillColor?g.fillColor:
-mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var V=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),U=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),A=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),sa=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),N=g&&g.opacity?g.opacity:
-mxUtils.getValue(this.style,"opacity","100"),pa=Math.max(0,Math.min(50,m));g=X.prototype;b.setDashed(z);G&&""!=G&&b.setDashPattern(G);b.setStrokeWidth(V);m=Math.min(.5*e,.5*c,m);k||(m=pa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(p=Math.min(v*Math.min(c,e)/100));p=Math.min(p,.5*Math.min(c,e)-m);(u||n||B||C)&&"frame"!=q&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,x,m,C):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),n&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,
-c,e,l,y,m,B),B&&g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),C&&g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(U),z=k=N,"none"==U&&(k=0),"none"==A&&(z=0),b.setGradient(U,A,0,0,c,e,sa,k,z),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C):b.moveTo(p,0),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),C&&B&&g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),B&&n&&g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,
-d,f,c,e,l,t,m,p,u,n),n&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),u&&C&&g.paintNWInner(b,d,f,c,e,l,x,m,p),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,d,f,c,e,l,x,t,y,I,m,u,n,B,C),b.stroke()));u||n||B||!C?u||n||!B||C?!u&&!n&&B&&C?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,
-d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):u||!n||B||C?!u&&n&&!B&&C?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==
-q&&(g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,
-l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):!u&&n&&B&&!C?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,
-d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):!u&&n&&B&&C?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,
-d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,
-d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):!u||n||B||C?u&&!n&&!B&&C?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke()):u&&!n&&B&&!C?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke(),b.begin(),
-g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):
-u&&!n&&B&&C?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,
-m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):u&&n&&!B&&!C?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,
-n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,
-c,e,l,x,m,p,C,u),b.close(),b.fillAndStroke()):u&&n&&!B&&C?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke()):u&&n&&B&&!C?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,
-C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,
-m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),b.close(),b.fillAndStroke()):u&&n&&B&&C&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,
-u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,
-e,l,I,m,p,B,C),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,
-e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,
-e,l,x,m,p,C,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&
-(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,
-d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,x,t,y,I,m,u,n,B,C);b.stroke()};X.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};X.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};X.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
-"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};X.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):b.moveTo(m,e)};X.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};X.prototype.paintTop=
-function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};X.prototype.paintNE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};X.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==
-l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};X.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,0):b.lineTo(0,m)};X.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,
-e)};X.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};X.prototype.paintSW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};X.prototype.paintNWInner=function(b,d,f,
-c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};X.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(0,k):p&&!q?b.lineTo(k,0):p?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
-"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};X.prototype.paintNEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};X.prototype.paintRightInner=
-function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(c-k,0):p&&!q?b.lineTo(c,k):p?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};X.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,e):p&&!q?b.lineTo(0,e-k):p?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
-l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};X.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};X.prototype.paintBottomInner=function(b,d,f,c,
-e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(c,e-k):p&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!p?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};X.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,p){if(!p)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
-l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};X.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
-e-m-k):b.moveTo(0,e-k)};X.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};X.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
-g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};X.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
-k,e)};X.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g||p?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};X.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g||p?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
-l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};X.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.moveTo(k,0):p&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
-0)};X.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,0):p&&!q?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};X.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,p,q,G,u,n,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==p)("fold"==l||"default"==
-l&&"fold"==g)&&G&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&G&&u&&(b.moveTo(c-q,0),b.lineTo(c-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==g)&&n&&u&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==p||"default"==p&&"fold"==g)&&n&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(X.prototype.cst.RECT2,X);X.prototype.constraints=null;mxUtils.extend(wa,mxConnector);wa.prototype.origPaintEdgeShape=wa.prototype.paintEdgeShape;
-wa.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,g=b.state.fixDash;wa.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),wa.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",wa);"undefined"!==typeof StyleFormatPanel&&function(){var b=
-StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),G=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),G=g*(l+k+1),u=c.x+q/2,n=c.y+G/2;c.x-=q;c.y-=G;return function(){b.begin();b.moveTo(u-q/2-G/2,n-G/2+q/2);b.lineTo(u-q/2+G/2,n-G/2-q/2);b.lineTo(u+G/2-3*q/2,n-3*G/2-q/2);b.lineTo(u-G/2-3*q/2,n-3*G/2+q/2);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),G=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.moveTo(c.x-q/2+G/2,c.y-
-G/2-q/2);b.lineTo(c.x-G/2-3*q/2,c.y-3*G/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Na);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,p){var q=c.clone(),G=Na.apply(this,arguments),u=e*(l+2*k),n=g*(l+2*k);return function(){G.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-g*k);b.lineTo(q.x-2*u+e*k,q.y-2*n+g*k);b.moveTo(q.x-u-n+g*k,q.y-n+u-e*k);b.lineTo(q.x+n-u-g*k,q.y-n-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),G=g*(l+
-k+1),u=c.clone();c.x-=p;c.y-=G;return function(){b.begin();b.moveTo(u.x-G,u.y+p);b.quadTo(c.x-G,c.y+p,c.x,c.y);b.quadTo(c.x+G,c.y-p,u.x+G,u.y-p);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,p){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var q=c.clone();q.x-=d;q.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(q.x,q.y);m?b.lineTo(q.x-e-g/2,q.y-g+e/2):b.lineTo(q.x+g/2-e,q.y-g-e/2);b.lineTo(q.x-e,q.y-g);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
-function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,q,p){g*=m+q;l*=m+q;var G=e.clone();return function(){d.begin();d.moveTo(G.x,G.y);k?d.lineTo(G.x-g-l/b,G.y-l+g/b):d.lineTo(G.x+l/b-g,G.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Ma(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
-Math.round(2*d)/b.view.scale-f})},Ma=function(b,d,f,c,e){return fa(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,q=Math.sqrt(g*g+k*k),m=c.call(this,q,g/q,k/q,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,q=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-q.x,p=l.y-q.y,G=Math.sqrt(m*m+p*p);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
-G,m/G,p/G,q,l,c,g)})},Fa=function(b){return function(d){return[fa(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ea.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ea.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[fa(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Sa=function(b,d,f){return function(c){var e=[fa(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
-c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ba(c));return e}},Oa=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[fa(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
-c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Ba(g));return l}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[fa(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,g*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ba(c));return e}},La=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d}},Ba=function(b,d){return fa(b,
+dispName:"Fold"}]}];W.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};W.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),p=g&&g.rectOutline?g.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),q=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),F=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,q)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),n=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),A=g&&g.bottom?g.bottom:
+mxUtils.getValue(this.style,"bottom",!0),x=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),I=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),G=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),B=g&&g.fillColor?g.fillColor:
+mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var C=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),S=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),ta=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),N=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),ca=g&&g.opacity?g.opacity:
+mxUtils.getValue(this.style,"opacity","100"),qa=Math.max(0,Math.min(50,m));g=W.prototype;b.setDashed(z);F&&""!=F&&b.setDashPattern(F);b.setStrokeWidth(C);m=Math.min(.5*e,.5*c,m);k||(m=qa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(q=Math.min(v*Math.min(c,e)/100));q=Math.min(q,.5*Math.min(c,e)-m);(u||n||A||x)&&"frame"!=p&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,I,m,x):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),n&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,
+c,e,l,G,m,A),A&&g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),x&&g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(S),z=k=ca,"none"==S&&(k=0),"none"==ta&&(z=0),b.setGradient(S,ta,0,0,c,e,N,k,z),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x):b.moveTo(q,0),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),x&&A&&g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),A&&n&&g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,
+d,f,c,e,l,t,m,q,u,n),n&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),u&&x&&g.paintNWInner(b,d,f,c,e,l,I,m,q),b.fill(),"none"==B&&(b.begin(),g.paintFolds(b,d,f,c,e,l,I,t,G,y,m,u,n,A,x),b.stroke()));u||n||A||!x?u||n||!A||x?!u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,
+d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):u||!n||A||x?!u&&n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==
+p&&(g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,
+l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,
+d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==p&&(g.moveNWInner(b,
+d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,
+d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u||n||A||x?u&&!n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke()):u&&!n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke(),b.begin(),
+g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):
+u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,G,
+m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):u&&n&&!A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,
+n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,
+c,e,l,I,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke()):u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,
+x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,
+m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&A&&x&&("frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,
+u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),b.close(),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,
+e,l,y,m,q,A,x),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,
+e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke())):"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,
+e,l,I,m,q,x,u),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&
+(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,
+d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,I,t,G,y,m,u,n,A,x);b.stroke()};W.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};W.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};W.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
+"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};W.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):b.moveTo(m,e)};W.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};W.prototype.paintTop=
+function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};W.prototype.paintNE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};W.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==
+l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};W.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,0):b.lineTo(0,m)};W.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,
+e)};W.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};W.prototype.paintSW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};W.prototype.paintNWInner=function(b,d,f,
+c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};W.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(0,k):q&&!p?b.lineTo(k,0):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
+"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};W.prototype.paintNEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};W.prototype.paintRightInner=
+function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c-k,0):q&&!p?b.lineTo(c,k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};W.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,e):q&&!p?b.lineTo(0,e-k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};W.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};W.prototype.paintBottomInner=function(b,d,f,c,
+e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c,e-k):q&&!p?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!q?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};W.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,q){if(!q)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
+l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};W.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
+e-m-k):b.moveTo(0,e-k)};W.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};W.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};W.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
+k,e)};W.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};W.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};W.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.moveTo(k,0):q&&!p?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
+0)};W.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,0):q&&!p?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};W.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,q,p,F,u,n,A){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==q)("fold"==l||"default"==
+l&&"fold"==g)&&F&&A&&(b.moveTo(0,p),b.lineTo(p,p),b.lineTo(p,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&u&&(b.moveTo(c-p,0),b.lineTo(c-p,p),b.lineTo(c,p)),("fold"==k||"default"==k&&"fold"==g)&&n&&u&&(b.moveTo(c-p,e),b.lineTo(c-p,e-p),b.lineTo(c,e-p)),("fold"==q||"default"==q&&"fold"==g)&&n&&A&&(b.moveTo(0,e-p),b.lineTo(p,e-p),b.lineTo(p,e))};mxCellRenderer.registerShape(W.prototype.cst.RECT2,W);W.prototype.constraints=null;mxUtils.extend(ya,mxConnector);ya.prototype.origPaintEdgeShape=ya.prototype.paintEdgeShape;
+ya.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,g=b.state.fixDash;ya.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),ya.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",ya);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/2-p/2);b.stroke()}});mxMarker.addMarker("box",
+function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),F=g*(l+k+1),u=c.x+p/2,n=c.y+F/2;c.x-=p;c.y-=F;return function(){b.begin();b.moveTo(u-p/2-F/2,n-F/2+p/2);b.lineTo(u-p/2+F/2,n-F/2-p/2);b.lineTo(u+F/2-3*p/2,n-3*F/2-p/2);b.lineTo(u-F/2-3*p/2,n-3*F/2+p/2);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/2-p/2);b.moveTo(c.x-p/2+F/2,c.y-
+F/2-p/2);b.lineTo(c.x-F/2-3*p/2,c.y-3*F/2+p/2);b.stroke()}});mxMarker.addMarker("circle",Na);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var p=c.clone(),F=Na.apply(this,arguments),u=e*(l+2*k),n=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(p.x-e*k,p.y-g*k);b.lineTo(p.x-2*u+e*k,p.y-2*n+g*k);b.moveTo(p.x-u-n+g*k,p.y-n+u-e*k);b.lineTo(p.x+n-u-g*k,p.y-n-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),F=g*(l+
+k+1),u=c.clone();c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(u.x-F,u.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,c.y-q,u.x+F,u.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,q){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var p=c.clone();p.x-=d;p.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(p.x,p.y);m?b.lineTo(p.x-e-g/2,p.y-g+e/2):b.lineTo(p.x+g/2-e,p.y-g-e/2);b.lineTo(p.x-e,p.y-g);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
+function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,p,q){g*=m+p;l*=m+p;var F=e.clone();return function(){d.begin();d.moveTo(F.x,F.y);k?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Ma(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
+Math.round(2*d)/b.view.scale-f})},Ma=function(b,d,f,c,e){return ga(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,p=Math.sqrt(g*g+k*k),m=c.call(this,p,g/p,k/p,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,p=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-p.x,q=l.y-p.y,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
+F,m/F,q/F,p,l,c,g)})},Ha=function(b){return function(d){return[ga(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ea.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ea.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ga(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Sa=function(b,d,f){return function(c){var e=[ga(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},Oa=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ga(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
+c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Da(g));return l}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ga(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,g*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},La=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d}},Da=function(b,d){return ga(b,
[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*
-e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},fa=function(b,d,f,c,e,g,l){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);
+e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ga=function(b,d,f,c,e,g,l){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);
l&&l(b)};m.getPosition=f;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(g){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Pa={link:function(b){return[Ya(b,!0,10),Ya(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Ma(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(d,f,c,e,g){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,g,l,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/
3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(Ma(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
@@ -2864,91 +2865,91 @@ parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUt
b.view.scale)+f*d/2)},function(f,c,e,g,l,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<
d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(Ma(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,g){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,g,l,m,k){f=
Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-
-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Ba(b,f/2))}d.push(fa(b,[mxConstants.STYLE_STARTSIZE],
+parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Da(b,f/2))}d.push(ga(b,[mxConstants.STYLE_STARTSIZE],
function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,
Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],g=0;g<c.length;g++)c[g]!=b.cell&&d.isSwimlane(c[g])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[g]))==f&&e.push(c[g]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:La(),ext:La(),rectangle:La(),
-triangle:La(),rhombus:La(),umlLifeline:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[fa(b,["width","height"],function(b){var d=Math.max(ba.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",ba.prototype.width))),
-f=Math.max(1.5*ba.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",ba.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=Math.round(Math.max(ba.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*ba.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[fa(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,
-"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},cross:function(b){return[fa(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Ea.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[fa(b,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[fa(b,["size"],function(b){var d=
-Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},dataStorage:function(b){return[fa(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?O.prototype.fixedSize:
-O.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[fa(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-d)},function(b,d){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),fa(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));
-return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),fa(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(b.x+Math.min(b.width,
-f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},internalStorage:function(b){var d=[fa(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
-"dy",da.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},module:function(b){return[fa(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",na.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
-mxUtils.getValue(this.state.style,"jettyHeight",na.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[fa(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
-"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[fa(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
-d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Fa(1),doubleArrow:Fa(.5),folder:function(b){return[fa(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[fa(b,
-["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(q.prototype.size),offPageConnector:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size))));
+triangle:La(),rhombus:La(),umlLifeline:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ga(b,["width","height"],function(b){var d=Math.max(X.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",X.prototype.width))),
+f=Math.max(1.5*X.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",X.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=Math.round(Math.max(X.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*X.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ga(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},cross:function(b){return[ga(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ga.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ga(b,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ga(b,["size"],function(b){var d=
+Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},dataStorage:function(b){return[ga(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?ja.prototype.fixedSize:
+ja.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ga(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-d)},function(b,d){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ga(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));
+return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ga(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(b.x+Math.min(b.width,
+f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},internalStorage:function(b){var d=[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",da.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},module:function(b){return[ga(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",ka.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
+mxUtils.getValue(this.state.style,"jettyHeight",ka.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",U.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
+d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ha(1),doubleArrow:Ha(.5),folder:function(b){return[ga(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ga(b,
+["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ua.prototype.size))));
return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,
-["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Oa(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Oa(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Oa(E.prototype.size,!1),display:Oa(za.prototype.size,!1),cube:Sa(1,
-c.prototype.size,!1),card:Sa(.5,v.prototype.size,!0),loopLimit:Sa(.5,ua.prototype.size,!0),trapezoid:Va(.5,D.prototype.size,D.prototype.fixedSize),parallelogram:Va(1,F.prototype.size,F.prototype.fixedSize)};Graph.createHandle=fa;Graph.handleFactory=Pa;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
+["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Oa(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Oa(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Oa(E.prototype.size,!1),display:Oa(Aa.prototype.size,!1),cube:Sa(1,
+c.prototype.size,!1),card:Sa(.5,v.prototype.size,!0),loopLimit:Sa(.5,xa.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=ga;Graph.handleFactory=Pa;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(d=mxConstants.SHAPE_SWIMLANE);d=Pa[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Pa[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);
-b=Pa[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Qa=new mxPoint(1,0),Ra=new mxPoint(1,0),Fa=mxUtils.toRadians(-30),Qa=mxUtils.getRotatedPoint(Qa,Math.cos(Fa),Math.sin(Fa)),Fa=mxUtils.toRadians(-150),Ra=mxUtils.getRotatedPoint(Ra,Math.cos(Fa),Math.sin(Fa));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==
-m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Qa.x,q=Qa.y,p=Ra.x,G=Ra.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=n.x;var c=d-n.y;d=(G*b-p*c)/(k*G-q*p);b=(q*b-k*c)/(q*p-k*G);u?(f&&(n=new mxPoint(n.x+k*d,n.y+q*d),e.push(n)),n=new mxPoint(n.x+p*b,n.y+G*b)):(f&&(n=new mxPoint(n.x+p*b,n.y+G*b),e.push(n)),n=new mxPoint(n.x+k*d,n.y+q*d));e.push(n)};var n=m;null==
+b=Pa[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Qa=new mxPoint(1,0),Ra=new mxPoint(1,0),Ha=mxUtils.toRadians(-30),Qa=mxUtils.getRotatedPoint(Qa,Math.cos(Ha),Math.sin(Ha)),Ha=mxUtils.toRadians(-150),Ra=mxUtils.getRotatedPoint(Ra,Math.cos(Ha),Math.sin(Ha));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==
+m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Qa.x,p=Qa.y,q=Ra.x,F=Ra.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=n.x;var c=d-n.y;d=(F*b-q*c)/(k*F-p*q);b=(p*b-k*c)/(p*q-k*F);u?(f&&(n=new mxPoint(n.x+k*d,n.y+p*d),e.push(n)),n=new mxPoint(n.x+q*b,n.y+F*b)):(f&&(n=new mxPoint(n.x+q*b,n.y+F*b),e.push(n)),n=new mxPoint(n.x+k*d,n.y+p*d));e.push(n)};var n=m;null==
c&&(c=new mxPoint(m.x+(l.x-m.x)/2,m.y+(l.y-m.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-
c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));return b};A.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));return b};B.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};q.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};p.prototype.getConstraints=
+0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};q.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};da.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;Aa.prototype.constraints=mxEllipse.prototype.constraints;
-va.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};na.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,
-"jettyWidth",na.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",na.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};da.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;
+pa.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};ka.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,
+"jettyWidth",ka.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",ka.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,d));f>15*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ua.prototype.constraints=mxRectangleShape.prototype.constraints;oa.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)];ga.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)];Y.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,
+.5),!1,null,d));f>15*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};xa.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];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)];oa.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)];m.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,
+.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)];p.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)];y.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)];M.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)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.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)];ca.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)];F.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;x.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;S.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+.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)];D.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;x.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;U.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d+c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};ia.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};ta.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)];ea.prototype.getConstraints=
+1),!1));return b};wa.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)];ea.prototype.getConstraints=
function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};ha.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ea.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ea.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};Ea.prototype.getConstraints=
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};Ga.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(f-e)/2,g=c+e,l=(d-e)/2,e=l+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};I.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};G.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,n=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){g.popupMenuHandler.hideMenu();var b=g.view.scale,d=g.view.translate.x,c=g.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-g.view.scale)&&d==g.view.translate.x&&c==g.view.translate.y&&e.actions.get(g.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){g.isEnabled()&&(g.isSelectionEmpty()?e.actions.get("smartFit").funct():
-g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null})}).isEnabled=n;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=n;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=n;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
320,240,!0,!0)}).isEnabled=n;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
null!=b&&g.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(g)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(f){}try{mxClipboard.copy(g)}catch(f){e.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{g.getModel().endUpdate()}}else mxClipboard.paste(g)}),
b=!0)}catch(l){}b||mxClipboard.paste(g)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,f=0;f<b.length&&d;f++)d=d&&g.model.isEdge(b[f]);var c=g.view.translate,f=g.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var m=g.getCellGeometry(b[0]);null!=m&&(c=m.getTerminalPoint(!0))}c=null!=c?c:g.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(g.snap(g.popupMenuHandler.triggerX/f-e)),f=Math.round(g.snap(g.popupMenuHandler.triggerY/
-f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(m){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
+f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(p){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
(b=g.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedSize){g.getModel().beginUpdate();try{for(var b=g.getResizableCells(g.getSelectionCells()),d=0;d<b.length;d++)if(g.getModel().isVertex(b[d])){var c=g.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,g.getModel().setGeometry(b[d],c))}}finally{g.getModel().endUpdate()}}},
null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=g.getSelectionCell()||g.getModel().getRoot();g.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function f(d,f){var e=c.getValue(d);f=d.cloneValue(f);f.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||f.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||f.setAttribute("label",
g.convertValueToString(d));c.setValue(d,f)}b=null!=d?d:b;var c=g.getModel();if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=g.getEditableCells(g.getSelectionCells());if(0==l.length)f(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)f(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
@@ -2963,11 +2964,11 @@ null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=g.get
d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=g.getLinkForCell(g.getSelectionCell());null!=b&&g.openLink(b)});this.addAction("editLink...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d=g.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,f){d=mxUtils.trim(d);g.setLinkForCell(b,0<d.length?d:null);g.setAttributeForCell(b,"linkTarget",f)},!0,g.getLinkTargetForCell(b))}},
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=n;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));d.vertex=!0;f=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([d],!0));d.geometry.x=f.x;d.geometry.y=f.y;g.setAttributeForCell(d,"linkTarget",c);g.setLinkForCell(d,b);g.cellSizeUpdated(d,
-!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var m=b.getElementsByTagName("a"),
-k=0;k<m.length&&null==d;k++)m[k].textContent==b.textContent&&(d=m[k]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var n=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(n);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
-try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var m=
-mxUtils.getValue(state.style,"html","0");if("1"==m&&null==b){var k=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=g.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(n.childNodes);g.cellLabelChanged(state.cell,k);g.setCellStyles("html",b,[d[c]])}else"0"==m&&"1"==b&&(k=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(k=k.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(k)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
+!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
+q=0;q<k.length&&null==d;q++)k[q].textContent==b.textContent&&(d=k[q]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var n=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(n);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
+try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var k=
+mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var q=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(q=q.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=g.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(n.childNodes);g.cellLabelChanged(state.cell,q);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(q=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(q=q.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(q)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
function(){var b="0",d=g.getView().getState(g.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&g.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){g.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){g.isFastZoomEnabled()?
g.lazyZoom(!0,!0,e.buttonZoomDelay):g.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){g.isFastZoomEnabled()?g.lazyZoom(!1,!0,e.buttonZoomDelay):g.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=g.isSelectionEmpty()?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,c=g.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=g.backgroundImage&&
b.add(new mxRectangle(0,0,g.backgroundImage.width,g.backgroundImage.height));0==b.width||0==b.height?(g.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),g.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/b.width/d,(g.container.clientHeight-
@@ -2991,12 +2992,12 @@ g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("shar
c);g.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}});this.addAction("curved",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=g.view.getState(g.getSelectionCell()),d="1";null!=b&&null!=g.getFoldingImage(b)&&(d="0");g.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",g.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=g.getEditableCells(g.getSelectionCells());if(null!=b&&0<b.length){var d=
g.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&g.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&e.setDefaultStyle(g.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){g.isEnabled()&&e.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,p=c.x,c=c.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=n;)p+=n.x,c+=n.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);p=Math.round(g.snap(g.popupMenuHandler.triggerX/e-p));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
-e-c));d.addPointAt(d.state,p,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,q=c.x,c=c.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=n;)q+=n.x,c+=n.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);q=Math.round(g.snap(g.popupMenuHandler.triggerX/e-q));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
+e-c));d.addPointAt(d.state,q,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
null,[e]),g.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,g.getModel().setGeometry(e,l))}}}finally{g.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
-mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var m=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(m),
+mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(k),
g.insertImage(b,d,c);else{var f=g.getSelectionCells();if(null!=b&&(0<b.length||0<f.length)){var e=null;g.getModel().beginUpdate();try{if(0==f.length){var f=[g.insertVertex(g.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;e=f;g.fireEvent(new mxEventObject("cellsInserted","cells",e))}g.setCellStyles(mxConstants.STYLE_IMAGE,
-0<b.length?b:null,f);var k=g.getCurrentCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var p=f[0],q=g.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(p,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
+0<b.length?b:null,f);var m=g.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var p=f[0],q=g.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(p,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=n;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));t=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));
t=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
@@ -3008,22 +3009,22 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(b,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,c):this.updateFile(b,c)};
DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(n){null!=c&&c(n)}}),c))};
DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:n,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(n,
-d[0]);k={};var l=this.ui.getHashValueForPages(f,k),n={},q=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",q==l,l);if(null!=l&&l!=q){var m=this.compressReportData(this.getAnonymizedXmlForPages(t)),p=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(F);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}}catch(D){}}};
+d[0]);k={};var l=this.ui.getHashValueForPages(f,k),n={},m=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),q=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(D);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,D)}}catch(C){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var n=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?n(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?n(b):n(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),q=l.lastIndexOf("."),t="xml";0<q&&(t=l.substring(q));var m=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+g+"\n\nData:\n"+n,k)}catch(p){}};
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+g+"\n\nData:\n"+n,k)}catch(q){}};
DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(k){null!=c&&c(k)}};DrawioFile.prototype.copyFile=function(b,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var c=!0,e=0;e<b.length&&c;e++)c=c&&0==Object.keys(b[e]).length;return c};
-DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,q=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());q.apply(this,arguments)};t.model.beginUpdate();try{for(var m=
-0;m<b.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[m],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,m=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());m.apply(this,arguments)};t.model.beginUpdate();try{for(var p=
+0;p<b.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[p],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=m;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(f!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
DrawioFile.prototype.save=function(b,c,e,k,g,n){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,k){};
@@ -3121,137 +3122,137 @@ dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return
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(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{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(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.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## 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## 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 or a JSON string as used in Layout, Apply.\n## 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(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,m=b.state.dashed,k=f.fillWeight;
-0>k&&(k=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(m);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
+Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
+0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,d){var c=1;if(null!=this.shape.state){var f=this.shape.state.cell.id;if(null!=f)for(var e=0;e<f.length;e++)c=(c<<5)-c+f.charCodeAt(e)<<0}c={strokeWidth:this.canvas.state.strokeWidth,seed:c,preserveVertices:!0};f=this.rc.getDefaultOptions();b?c.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
delete c.stroke;e=null;(c.filled=d)?(c.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):c.fill="";c.bowing=mxUtils.getValue(this.shape.style,"bowing",f.bowing);c.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",f.hachureAngle);c.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",f.curveFitting);c.roughness=mxUtils.getValue(this.shape.style,"jiggle",f.roughness);c.simplification=
mxUtils.getValue(this.shape.style,"simplification",f.simplification);c.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",f.disableMultiStroke);c.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",f.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);c.hachureGap="auto"==g?-1:g;c.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);c.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);c.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
-this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=
-function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var m=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=m)for(var k=0;k<m.length;k+=6)this.curveTo(m[k],m[k+1],m[k+2],m[k+3],m[k+4],m[k+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
-c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
-this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.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(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var m=this.configurePointerEvents,k=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
-c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=k;this.configurePointerEvents=m;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,m){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
-function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==f[g].getAttribute("class")){e.push(f[g]);
-break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&
-(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
-f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var m=b.charCodeAt(e),e=e+1;10!=m&&(d+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
-f){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){c=b.substring(e,k);break}}10==m&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
-d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
-0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
-ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
-b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
-b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(c=parseFloat(b.zoomFactor),!isNaN(c)&&1<c?Graph.prototype.zoomFactor=c:EditorUi.debug("Invalid zoomFactor: value must be float > 1"));null!=b.gridSteps&&
-(c=parseInt(b.gridSteps),!isNaN(c)&&0<c?mxGraphView.prototype.gridSteps=c:EditorUi.debug("Invalid gridSteps: value must be int > 0"));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),f=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(f)&&0<f?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,f),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Invalid pageFormat: value must be {width: int, height: int}"));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);
-b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&("string"===typeof b.fontCss?Editor.configureFontCss(b.fontCss):EditorUi.debug("Invalid fontCss: value must be string"));null!=b.autosaveDelay&&(c=parseInt(b.autosaveDelay),!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: value must be int > 0"));
-if(null!=b.plugins&&!d)for(App.initPluginCallback(),c=0;c<b.plugins.length;c++)mxscript(b.plugins[c]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));
-d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var f=b[c].indexOf(")"),f=Editor.trimCssUrl(b[c].substring(0,f)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",f);e.setAttribute("as","font");e.setAttribute("crossorigin","");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(b){return b.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(b){b=null!=b?b:Editor.GUID_LENGTH;for(var d=[],c=0;c<b;c++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;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(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=
-this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");
-null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],
-url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(I){console.log("ExtFonts format error: "+I.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 c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&
-"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};
-Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var c=mxUtils.parseXml(d).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(b,d,c){return Editor.extractGraphModel.apply(this,
-arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=
-b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
-window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=
-function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");
-g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(V){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
-function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.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(b)||
-"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):
-f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(f);
-c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(qa){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(ba){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,d,
-c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var m=b.getElementsByTagName(c),k=0;k<m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=f.convert(c.getAttribute(l));if(null!=m&&"data:"!=m.substring(0,5)){var k=g[m];null==k?(e++,this.convertImageToDataUri(m,function(f){null!=f&&(g[m]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,k)}else null!=m&&c.setAttribute(l,m)}}catch(la){}})(m[k])});c("image","xlink:href");c("img",
-"src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
-4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
-Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,m){try{var k=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:p})},m)});p()}catch(na){null!=c&&c(na)}};Editor.prototype.absoluteCssFonts=
-function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
-d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),
-m=null,k=c[g].indexOf("format(",l);0<k&&(m=Editor.trimCssUrl(c[g].substring(k+7,c[g].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
-else if("eot"==m||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),m)}e()}else d(b)};Editor.prototype.loadFonts=
-function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,
-mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
-Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,m,k,p,q,n,u,v,x,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var G=k?null:n.background;G==mxConstants.NONE&&(G=null);null==G&&(G=f);null==G&&0==k&&(G=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(n.getSvg(null,null,u,v,null,l,null,null,null,p,null,t,y,D),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(k,c)},0):(v.drawImage(f,0,0),b(k,c))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=d&&(m=g?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);m=this.getMaxCanvasScale(p,q,m);p=
-Math.ceil(m*p);q=Math.ceil(m*q);k.setAttribute("width",p);k.setAttribute("height",q);var v=k.getContext("2d");null!=G&&(v.beginPath(),v.rect(0,0,p,q),v.fillStyle=G,v.fill());1!=m&&v.scale(m,m);if(x){var t=n.view,y=t.scale;t.scale=1;var B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var B="data:image/svg+xml;base64,"+B,D=n.gridSize*t.gridSteps*m,C=n.getGraphBounds(),A=t.translate.x*y,N=t.translate.y*y,V=A+(C.x-A)/y-u,I=N+(C.y-N)/y-u,E=new Image;E.onload=function(){try{for(var b=
--Math.round(D-mxUtils.mod((A-V)*m,D)),d=-Math.round(D-mxUtils.mod((N-I)*m,D));b<p;b+=D)for(var c=d;c<q;c+=D)v.drawImage(E,b/m,c/m);l()}catch(X){null!=e&&e(X)}};E.onerror=function(b){null!=e&&e(b)};E.src=B}else l()}catch(ya){null!=e&&e(ya)}});f.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ea){null!=
-e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var n=g,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[g]=n;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
-8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=k;k+=d;return b.substring(c,k)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function m(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,k);do{var p=l(b);if("IDAT"==g(b,4)){e=b.substring(0,k-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=m(c)+m(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=m(c.length)+d+c+m(f^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);g(b,p);g(b,4)}while(p);return"data:image/png;base64,"+
-(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var p=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=p.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
-b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};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:"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);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",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
-type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},
-{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},
-{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",
-stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=
-0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(ba){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
-e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
-mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="104px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="104px",b.appendChild(c)):
-c.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){n.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],m=c.parentRow.nextSibling;m&&m.getAttribute("data-pName")==b;)l.push(m.getAttribute("data-pValue")),m=m.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
-null!=c.countProperty&&(n.setCellStyles(c.countProperty,l.length,n.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var k=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(k);p=p.join(",");n.setCellStyles(c.dependentProps[b],p,n.getSelectionCells());e.push(c.dependentProps[b]);g.push(p)}if("function"==
-typeof c.onChange)c.onChange(n,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height=
-"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,m){null!=d&&(d=d.split(","),u.push({name:b,
-values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var k=l,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var n={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=p(b,"",n,0==q%2,m);f(b,e,n);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function m(b,d,c,f,e,g,l){if(0<e){var m=Array(e);d=null!=d?d.split(","):[];for(var k=0;k<e;k++)m[k]=null!=d[k]?d[k]:null!=f?f:"";u.push({name:b,values:m,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function k(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function p(d,c,p,n,u){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+
-(u?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);n=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",n=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,v);y.setAttribute("title",v);n&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,p));else if("bool"==
-x||"boolean"==x)y.appendChild(k(d,c,p));else if("enum"==x){var D=p.enumList;for(u=0;u<D.length;u++)if(v=D[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<D.length;l++){var m=D[l],k=document.createElement("option");k.value=mxUtils.htmlEntities(m.val);mxUtils.write(k,mxResources.get(m.dispName,null,m.dispName));g.appendChild(k)}g.value=c;b.appendChild(g);
-mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,p)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,u)):"staticArr"==x?y.appendChild(m(d,c,p.subType,p.subDefVal,p.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,
-"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,p)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=p.min&&
-(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",p,p.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position=
-"relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;y.style.verticalAlign="middle";t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var D=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),
-c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(va){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;D()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var G=!1,B=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(p("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var C=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
-x.type)B=!B;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,E=[],F=[],t=0;t<N.length;t++){var P=c.style[N[t]];F.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=F;x.dependentPropsVals=E}v.appendChild(p(A,C,x,G,B));G=!G}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=p(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
-index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(v);D();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="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(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var m=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");
-p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);m.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(m[this.format.currentScheme].style.background="transparent");
-this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);m[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var m=f.getModel().getStyle(e[l]),k=0;k<g.length;k++)m=mxUtils.removeStylename(m,g[k]);var p=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:
-c.initialdefaultEdgeStyle;null!=b?(m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(m=""==b.fill?mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(m=""==b.stroke?mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,
-b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(m=mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),m=mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),m=mxUtils.setStyle(m,
-mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],m)}}finally{f.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";
-null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):
-b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=
-mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+m}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
-28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(u,
-"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"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==);";
+"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state&&"transparent"!=this.shape.state.view.graph.defaultPageBackgroundColor?this.shape.state.view.graph.defaultPageBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=
+function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?
+this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],
+k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(ca){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;
+b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};b.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(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):
+this.createRoughCanvas(b)};var c=mxShape.prototype.paint;mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=
+function(){});d.handJiggle.passThrough=!0;c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=
+!1):f.apply(this,arguments)}})();Editor.fastCompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==
+f[g].getAttribute("class")){e.push(f[g]);break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,
+f))),null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,
+d){var c=mxUtils.trim(mxUtils.getTextContent(b)),f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=
+function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));
+k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),
+null!=d&&0<d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,
+e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(G){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;
+null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;
+ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=
+b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);
+null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(c=parseFloat(b.zoomFactor),
+!isNaN(c)&&1<c?Graph.prototype.zoomFactor=c:EditorUi.debug("Invalid zoomFactor: value must be float > 1"));null!=b.gridSteps&&(c=parseInt(b.gridSteps),!isNaN(c)&&0<c?mxGraphView.prototype.gridSteps=c:EditorUi.debug("Invalid gridSteps: value must be int > 0"));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),f=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(f)&&0<f?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,f),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
+EditorUi.debug("Invalid pageFormat: value must be {width: int, height: int}"));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&("string"===typeof b.fontCss?Editor.configureFontCss(b.fontCss):EditorUi.debug("Invalid fontCss: value must be string"));null!=b.autosaveDelay&&(c=parseInt(b.autosaveDelay),
+!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: value must be int > 0"));if(null!=b.plugins&&!d)for(App.initPluginCallback(),c=0;c<b.plugins.length;c++)mxscript(b.plugins[c]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&
+null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var f=b[c].indexOf(")"),f=Editor.trimCssUrl(b[c].substring(0,f)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",f);e.setAttribute("as","font");e.setAttribute("crossorigin","");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(b){return b.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(b){b=null!=b?b:Editor.GUID_LENGTH;for(var d=[],c=0;c<b;c++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;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(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||
+"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=
+c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),
+!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(G){console.log("ExtFonts format error: "+G.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 c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=
+function(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+
+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var c=mxUtils.parseXml(d).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=
+function(b,d,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};
+var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
+Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},
+SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",
+b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(ca){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.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(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==
+b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,
+mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(ma){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);
+c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(X){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,d,c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=f.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=g[k];null==m?(e++,this.convertImageToDataUri(k,function(f){null!=f&&(g[k]=f,c.setAttribute(l,f));
+e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(la){}})(k[m])});c("image","xlink:href");c("img","src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);
+d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,k){try{var m=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==
+typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=
+c&&c({code:App.ERROR_TIMEOUT,retry:p})},k)});p()}catch(ka){null!=c&&c(ka)}};Editor.prototype.absoluteCssFonts=function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&
+(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);
+b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),k=null,m=c[g].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[g].substring(m+7,c[g].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==
+k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,
+null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;null!=b&&b()})):null!=b&&b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==
+f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&
+0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):
+c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,p,q,n,u,x,v,t,y,B){try{g=null!=g?g:!0;
+l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var F=m?null:n.background;F==mxConstants.NONE&&(F=null);null==F&&(F=f);null==F&&0==m&&(F=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(n.getSvg(null,null,u,x,null,l,null,null,null,p,null,t,y,B),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(f,0,0);b(m,c)},0):(x.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),
+p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);k=this.getMaxCanvasScale(p,q,k);p=Math.ceil(k*p);q=Math.ceil(k*q);m.setAttribute("width",p);m.setAttribute("height",q);var x=m.getContext("2d");null!=F&&(x.beginPath(),x.rect(0,0,p,q),x.fillStyle=F,x.fill());1!=k&&x.scale(k,k);if(v){var t=n.view,y=t.scale;t.scale=1;var A=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var A="data:image/svg+xml;base64,"+
+A,B=n.gridSize*t.gridSteps*k,C=n.getGraphBounds(),I=t.translate.x*y,N=t.translate.y*y,G=I+(C.x-I)/y-u,E=N+(C.y-N)/y-u,D=new Image;D.onload=function(){try{for(var b=-Math.round(B-mxUtils.mod((I-G)*k,B)),d=-Math.round(B-mxUtils.mod((N-E)*k,B));b<p;b+=B)for(var c=d;c<q;c+=B)x.drawImage(D,b/k,c/k);l()}catch(W){null!=e&&e(W)}};D.onerror=function(b){null!=e&&e(b)};D.src=A}else l()}catch(za){null!=e&&e(za)}});f.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);
+var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ea){null!=e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var n=g,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[g]=n;Editor.updateCRC=
+function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&
+255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var p=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,
+c,0,c.length);e+=k(c.length)+d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+p);g(b,p);g(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;
+ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.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 b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(b){b=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});
+Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=q.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);
+d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=
+function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};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:"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);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",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",
+dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];
+mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},
+{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,
+defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=
+[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",
+font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||
+(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(X){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=
+b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var v=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="104px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),
+c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="104px",b.appendChild(c)):c.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){n.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==
+b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");null!=c.countProperty&&(n.setCellStyles(c.countProperty,l.length,n.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];
+if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(m);p=p.join(",");n.setCellStyles(c.dependentProps[b],p,n.getSelectionCells());e.push(c.dependentProps[b]);g.push(p)}if("function"==typeof c.onChange)c.onChange(n,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";
+c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":
+d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,k){null!=d&&(d=d.split(","),u.push({name:b,values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var n={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,
+countProperty:g},q=p(b,"",n,0==q%2,k);f(b,e,n);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function k(b,d,c,f,e,g,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=f?f:"";u.push({name:b,values:k,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";
+e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function p(d,c,p,n,u){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+(u?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);n=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",n=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,
+v);y.setAttribute("title",v);n&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,p));else if("bool"==x||"boolean"==x)y.appendChild(m(d,c,p));else if("enum"==x){var B=p.enumList;for(u=0;u<B.length;u++)if(v=B[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<B.length;l++){var k=
+B[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);mxUtils.write(m,mxResources.get(k.dispName,null,k.dispName));g.appendChild(m)}g.value=c;b.appendChild(g);mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,p)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,u)):"staticArr"==x?y.appendChild(k(d,c,p.subType,p.subDefVal,p.size,t,u)):"readOnly"==
+x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,
+b,p)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=p.min&&(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",p,p.index);mxEvent.consume(b)})),u.style.height=
+"16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position="relative";b.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;
+y.style.verticalAlign="middle";t.appendChild(y);mxUtils.write(t,mxResources.get("property"));v.style.cursor="pointer";var B=function(){var d=x.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(pa){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=
+c};mxEvent.addListener(v,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;B()});v.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");v.appendChild(t);x.appendChild(v);var C=!1,F=!1,v=null;1==c.vertices.length&&0==c.edges.length?v=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(v=c.edges[0].id);null!=v&&x.appendChild(p("id",mxUtils.htmlEntities(v),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(v=
+d[A],"function"!=typeof v.isVisible||v.isVisible(c,this)){var I=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(c,this):v.defVal;if("separator"==v.type)F=!F;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var N=v.dependentProps,E=[],D=[],t=0;t<N.length;t++){var P=c.style[N[t]];D.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}v.dependentPropsDefVal=D;v.dependentPropsVals=
+E}x.appendChild(p(A,I,v,C,F));C=!C}}for(t=0;t<u.length;t++)for(v=u[t],d=v.parentRow,c=0;c<v.values.length;c++)A=p(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:c,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==c%2,v.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(x);B();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
+"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="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(" "),l=document.createElement("div");
+l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,
+function(){q(b)}))})(m);k.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,
+l=0;l<e.length;l++){for(var k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var p=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,
+null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],k)}}finally{f.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=
+10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":
+d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):l+" "+(b.stroke||
+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=b.title&&d.setAttribute("title",b.title)}else{var l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,
+4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(u,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="210px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,f=1==d.cells.length?f.view.getState(d.cells[0]):null;null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",
mxResources.get("editShape")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0<d.cells.length&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),
@@ -3263,41 +3264,41 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=
null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||
2,c.colPercentages=d.colPercentages,c.rowPercentages=d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow=
-"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,m,k,p,q){F.apply(this,arguments);Graph.processFontAttributes(q)};
-var D=mxText.prototype.redraw;mxText.prototype.redraw=function(){D.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:m.slice();f();l.refresh()}function g(b,c){p.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
-"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(n,
+"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,p,q){D.apply(this,arguments);Graph.processFontAttributes(q)};
+var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){p.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
+"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(n,
g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(d||Editor.isDarkMode())n.style.filter="invert(100%)";q.appendChild(n);mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
-"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=m.slice(),k=mxUtils.indexOf(c,
-b);c.splice(k,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});p.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
-if(d||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(m,b);0<=c&&m.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(n)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
-"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}p.appendChild(q)}k.appendChild(p)})(b[q]);g.appendChild(k);p.appendChild(g)}}var l=this,m=l.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
-"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=l.isEnabled()?"1px solid #808080":"none";p.style.bottom=l.isEnabled()?"48px":"10px";k.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(m=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
-q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(m,function(b){m=b;u()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";l.addListener(mxEvent.ROOT,function(){m=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(m,f[e])&&m.push(f[e]);m.sort();l.isSelectionEmpty()?g(m):g(m,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
-u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(n),k.appendChild(v));return{div:k,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
+"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=k.slice(),m=mxUtils.indexOf(c,
+b);c.splice(m,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});p.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
+if(d||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(k,b);0<=c&&k.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(n)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
+"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}p.appendChild(q)}m.appendChild(p)})(b[q]);g.appendChild(m);p.appendChild(g)}}var l=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
+"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=l.isEnabled()?"1px solid #808080":"none";p.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
+q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
+u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(n),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
+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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
{}};var K=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=K.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,d,c,f,e,g,l,m,k,p,q,n,u,v){var x=null,t=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),D=this.getCustomFonts();if(q&&0<D.length){var A=y.ownerDocument,G=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");
-null!=A.setAttributeNS?G.setAttributeNS("type","text/css"):G.setAttribute("type","text/css");for(var N="",B="",E=0;E<D.length;E++){var C=D[E].name,F=D[E].url;Graph.isCssFontUrl(F)?N+="@import url("+F+");\n":B+='@font-face {\nfont-family: "'+C+'";\nsrc: url("'+F+'");\n}\n'}G.appendChild(A.createTextNode(N+B));y.getElementsByTagName("defs")[0].appendChild(G)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+function(b,d,c,f,e,g,l,k,m,p,q,n,u,v){var x=null,t=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),B=this.getCustomFonts();if(q&&0<B.length){var C=y.ownerDocument,F=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,"style"):C.createElement("style");
+null!=C.setAttributeNS?F.setAttributeNS("type","text/css"):F.setAttribute("type","text/css");for(var A="",N="",E=0;E<B.length;E++){var I=B[E].name,D=B[E].url;Graph.isCssFontUrl(D)?A+="@import url("+D+");\n":N+='@font-face {\nfont-family: "'+I+'";\nsrc: url("'+D+'");\n}\n'}F.appendChild(C.createTextNode(A+N));y.getElementsByTagName("defs")[0].appendChild(F)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=
f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
-var A=Graph.prototype.refresh;Graph.prototype.refresh=function(){A.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
+var B=Graph.prototype.refresh;Graph.prototype.refresh=function(){B.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||
-(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),m=mxUtils.bind(this,function(){0<f&&f--;0==f&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;m()}),
-f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,m,c?0:p.fadeIn.delay));null!=p.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,m,c?0:p.fadeOut.delay));
+(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<f&&f--;0==f&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),
+f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,k,c?0:p.fadeIn.delay));null!=p.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,k,c?0:p.fadeOut.delay));
null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(g(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){g();var n=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(n),1);this.setCellsVisible(n,!0)}null!=p.hide&&(g(),n=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(n),
0),this.setCellsVisible(n,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(g(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(g(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));n=[];null!=p.select&&this.isEnabled()&&(n=this.getCellsForAction(p.select),this.setSelectionCells(n));null!=p.highlight&&(n=this.getCellsForAction(p.highlight),
this.highlightCells(n,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(n=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<n.length&&this.scrollCellToVisible(n[0]);if(null!=p.tags){n=[];null!=p.tags.hidden&&(n=n.concat(p.tags.hidden));if(null!=p.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(p.tags.visible,u[v])&&0>mxUtils.indexOf(n,u[v])&&n.push(u[v]);this.hiddenTags=n;this.refresh()}0<q.length&&
-(f++,this.executeAnimations(q,m,c?1:p.steps,c?0:p.delay));0==f?k():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
-e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(U){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
+(f++,this.executeAnimations(q,k,c?1:p.steps,c?0:p.delay));0==f?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
+e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(S){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
d.length;c++){var f=d[c],e;for(e in f)this.updateCustomLinkAction(b,f[e],"cells"),this.updateCustomLinkAction(b,f[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var f=[],e=0;e<d[c].length;e++)if("*"==d[c][e])f.push(d[c][e]);else{var g=b[d[c][e]];null!=g?""!=g&&f.push(g):f.push(d[c][e])}d[c]=f}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var f=
[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&f.push(c[e]);c=f}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=f},f));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var P=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return P.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},m=0;m<b.length;m++)0<b[m].length&&(l[b[m]]=!0,g++);for(m=0;m<d.length;m++)if(c&&this.model.getParent(d[m])==
-this.model.root||this.model.isVertex(d[m])||this.model.isEdge(d[m])){var k=this.getTagsForCell(d[m]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<g;q++)null!=l[k[q]]&&p++;p=p==g}p&&(1!=f||this.isCellVisible(d[m]))&&e.push(d[m])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,g++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
+this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),p=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=p=0;q<m.length&&p<g;q++)null!=l[m[q]]&&p++;p=p==g}p&&(1!=f||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
c=[];if(0<e.length){for(var e=e.split(" "),g={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])g[e[l]]=!0,c.push(e[l]);d=g}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]);if(0<e.length)for(var e=e.split(" "),g=0;g<e.length;g++)null==c[e[g]]&&(c[e[g]]=!0,d.push(e[g]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
-b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.trim(d[l]);""!=m&&0>mxUtils.indexOf(e,m)&&(f=0<f.length?f+" "+m:m,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
-f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.indexOf(e,d[l]);0<=m&&(e.splice(m,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
+b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(f=0<f.length?f+" "+k:k,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
+f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(b,d,c,f){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,f)};Graph.prototype.highlightCell=function(b,d,c,f){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=f&&(g.opacity=f);g.highlight(b);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var f=b.ownerDocument,e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
@@ -3315,92 +3316,92 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/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(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var T=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,m,k,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
-mxStencilRegistry.getStencil(q)}return T.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(m,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(m,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,m=d.currentTranslate,k=d.currentScale,p=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
-d.view.translate=new mxPoint(0,0),d.view.scale=1);var n=d.getGraphBounds(),u=0,v=0,x=Q.get(),t=1/d.pageScale,A=D.checked;if(A)var t=parseInt(C.value),N=parseInt(J.value),t=Math.min(x.height*N/(n.height/d.view.scale),x.width*t/(n.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!A&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):
-A=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,A);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var V=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
+mxStencilRegistry.getStencil(q)}return V.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,p=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
+d.view.translate=new mxPoint(0,0),d.view.scale=1);var n=d.getGraphBounds(),u=0,v=0,x=H.get(),t=1/d.pageScale,C=B.checked;if(C)var t=parseInt(J.value),N=parseInt(R.value),t=Math.min(x.height*N/(n.height/d.view.scale),x.width*t/(n.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!C&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):
+C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,C);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var F=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=F.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
-e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=A;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,A=g[u].url,Graph.isCssFontUrl(A)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
-c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=m,d.currentScale=k,d.view.translate=p,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,m=v.value,p=!q.checked,
-n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,m,D.checked,C.value,J.value,parseInt(y.value)/100,parseInt(H.value)/100,Q.get());else{p&&(p=l==k&&m==k);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(m)-1);for(var t=x;t<=p;t++){var A=b.pages[t],l=A==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),m=!0,x=!1,N=null,E=null;null==A.viewState&&null==A.root&&b.updatePageRoot(A);null!=A.viewState&&
-(m=A.viewState.pageVisible,x=A.viewState.mathEnabled,N=A.viewState.background,E=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=m;l.mathEnabled=x;var F=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?A.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:F.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(A);l.model.setRoot(A.root)}n=
+if("undefined"!==typeof MathJax){var D=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=D.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,C=g[u].url,Graph.isCssFontUrl(C)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(C)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
+c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(C)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=p,d.view.scale=q);return c}var f=parseInt(I.value)/100;isNaN(f)&&(f=1,I.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,p=!q.checked,
+n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,B.checked,J.value,R.value,parseInt(y.value)/100,parseInt(I.value)/100,H.get());else{p&&(p=l==m&&k==m);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(k)-1);for(var t=x;t<=p;t++){var C=b.pages[t],l=C==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,E=null;null==C.viewState&&null==C.root&&b.updatePageRoot(C);null!=C.viewState&&
+(k=C.viewState.pageVisible,x=C.viewState.mathEnabled,N=C.viewState.background,E=C.viewState.backgroundImage,l.extFonts=C.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(C);l.model.setRoot(C.root)}n=
c(l,n,t!=p);l!=e&&l.container.parentNode.removeChild(l.container)}}else n=c(e);null==n?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(p=n.wnd.document,d&&(n.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),n.closeDocument(),!n.mathEnabled&&d&&PrintDialog.printPreview(n));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
-l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var m=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
+l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var n=q.cloneNode(!0);q.setAttribute("checked","checked");n.setAttribute("value","range");p.appendChild(n);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";p.appendChild(u);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=u.cloneNode(!0);p.appendChild(v);mxEvent.addListener(u,"focus",function(){n.checked=!0});mxEvent.addListener(v,"focus",function(){n.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(m=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){k=l+1;u.value=k;v.value=k;break}u.setAttribute("max",m);v.setAttribute("max",m);b.isPagesEnabled()?1<m&&(g.appendChild(p),
+mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=u.cloneNode(!0);p.appendChild(v);mxEvent.addListener(u,"focus",function(){n.checked=!0});mxEvent.addListener(v,"focus",function(){n.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(p),
n.checked=!0):n.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);
-mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var p=p.cloneNode(!1),D=t.cloneNode(!0);D.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(D);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),F=document.createElement("td"),
-P=F.cloneNode(!0),K=F.cloneNode(!0),G=F.cloneNode(!0),T=F.cloneNode(!0),M=F.cloneNode(!0);F.style.textAlign="right";G.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var C=document.createElement("input");C.style.cssText="margin:0 8px 0 8px;";C.setAttribute("value","1");C.setAttribute("min","1");C.setAttribute("type","number");C.style.width="40px";P.appendChild(C);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));K.appendChild(l);mxUtils.write(G,
-mxResources.get("fitToBy"));var J=C.cloneNode(!0);T.appendChild(J);mxEvent.addListener(C,"focus",function(){D.checked=!0});mxEvent.addListener(J,"focus",function(){D.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));M.appendChild(l);N.appendChild(F);N.appendChild(P);N.appendChild(K);E.appendChild(G);E.appendChild(T);E.appendChild(M);A.appendChild(N);A.appendChild(E);x.appendChild(A);p.appendChild(x);g.appendChild(p);p=document.createElement("div");l=
-document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var Q=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);g.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var p=p.cloneNode(!1),B=t.cloneNode(!0);B.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(B);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),D=document.createElement("td"),
+P=D.cloneNode(!0),K=D.cloneNode(!0),F=D.cloneNode(!0),V=D.cloneNode(!0),M=D.cloneNode(!0);D.style.textAlign="right";F.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";P.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));K.appendChild(l);mxUtils.write(F,
+mxResources.get("fitToBy"));var R=J.cloneNode(!0);V.appendChild(R);mxEvent.addListener(J,"focus",function(){B.checked=!0});mxEvent.addListener(R,"focus",function(){B.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));M.appendChild(l);N.appendChild(D);N.appendChild(P);N.appendChild(K);E.appendChild(F);E.appendChild(V);E.appendChild(M);C.appendChild(N);C.appendChild(E);x.appendChild(C);p.appendChild(x);g.appendChild(p);p=document.createElement("div");l=
+document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var H=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var I=document.createElement("input");I.style.cssText="margin:0 8px 0 8px;";
+I.setAttribute("value","100 %");I.style.width="60px";p.appendChild(I);g.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);g.appendChild(l);this.container=g};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 b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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 Q=document.createElement("canvas"),ga=new Image;ga.onload=function(){try{Q.getContext("2d").drawImage(ga,0,0);var b=Q.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=b&&6<b.length}catch(C){}};ga.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(G){}})();
+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 R=document.createElement("canvas"),ba=new Image;ba.onload=function(){try{R.getContext("2d").drawImage(ba,0,0);var b=R.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=b&&6<b.length}catch(I){}};ba.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(F){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.5.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.5.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="1"==urlParams.dev?"/cache":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&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,m,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(b);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(y){}try{n||null==window.console||console.error(k,b,c,e,g,m)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,k,q,n){q=null!=q?q:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}try{n||null==window.console||console.error(q,b,c,e,g,k)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
"")}catch(l){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=g;g+=d;return b.substring(c,g)}function f(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var g=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=f(b);var l=d(b,4);if(null!=c&&c(g-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
l)break}while(e)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(m){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(p){}};e.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(m){}try{c=
-document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(p){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(q){}};e.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(p){}try{c=
+document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var m=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),m=document.createElement("div"),
-m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily=Editor.defaultHtmlFont,m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,b)+"px",m.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(m.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),m.innerHTML=l,e.appendChild(m),f.status=m),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),m=!0);return m};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
-return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var k=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
+k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
+return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
-function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,m=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var d=
-m.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&m.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&m.movePage(d,0)};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,d+1)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,m.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&m.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
-d&&m.selectPage(m.pages[0])};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.selectNextPage(!0)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(b),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=k?mxUtils.getXml(k):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
+function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,k=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
+k.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&k.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&k.movePage(d,0)};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,d+1)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,k.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&k.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
+d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),q=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=q?mxUtils.getXml(q):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,m,k,n,v,t,x,F){c=null!=c?c:this.editor.graph;m=null!=m?m:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(F){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(p);if(Graph.decompress(l)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(p)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,q,n,v,t,x,D){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(D){var m=
+b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));F=F?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!k&&!m&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))F=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(k||!m&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(g=null),F=this.getEmbeddedSvg(F,c,g,null,v,t,f);return F};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));D=D?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!q&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))D=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(q||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),D=this.getEmbeddedSvg(D,c,g,null,v,t,f);return D};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?d.push(" "):d.push("?"):d.push(c?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var d=0;d<b[EditorUi.DIFF_INSERT].length;d++)try{var c=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));
-b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(p){b[EditorUi.DIFF_INSERT][d].data=p.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
+b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(q){b[EditorUi.DIFF_INSERT][d].data=q.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete g.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(g.cells).length&&delete g.cells);0==Object.keys(g).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,m,k,n,
-v,t,x,F){m=null!=m?m:!0;k=null!=k?k:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&
-null!=p.viewState&&d.setBackgroundImage(p.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(m,k,x,F);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,m,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,m,
-k){k=null!=k?k:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;k=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==m&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
-"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=m&&(m=m.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=e?"<title>"+mxUtils.htmlEntities(e)+
-"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,m){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,q,n,
+v,t,x,D){k=null!=k?k:!0;q=null!=q?q:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var m=this.pages[0];this.currentPage==m?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=m.viewState&&
+null!=m.viewState&&d.setBackgroundImage(m.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}n=null!=n?n:this.getXmlFileData(k,q,x,D);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,
+q){q=null!=q?q:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=q?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;q=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",q);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
+"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+
+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
null;var d=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b&&"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var c=null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),
null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),n=k.getChildren(k.root),e=0;e<n.length;e++){var v=n[e];k.setVisible(v,b[v.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,p,n,v,t,x,F,D){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
-var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&F?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,
-c){try{var f=this.editor.graph.pageVisible;null!=p&&(this.editor.graph.pageVisible=p);var e=this.createDownloadRequest(d,b,g,c,n,k,v,t,x,F,D);this.editor.graph.pageVisible=f;return e}catch(ga){this.handleError(ga)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;
-if(n||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,p,n,v,t,
-x,F){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==p?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=F?m="&from="+F.from+"&to="+F.to:0==p&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){l="&from="+p;break}p=
-d.background;"png"!=c&&"pdf"!=c||!k?k||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
+this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,q,n,v,t,x,D,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
+var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&D?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,
+c){try{var f=this.editor.graph.pageVisible;null!=q&&(this.editor.graph.pageVisible=q);var e=this.createDownloadRequest(d,b,g,c,n,k,v,t,x,D,C);this.editor.graph.pageVisible=f;return e}catch(ba){this.handleError(ba)}}));else{var m=null,p=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;
+if(n||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();p(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();p(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,q,n,v,t,
+x,D){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==q?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=D?m="&from="+D.from+"&to="+D.to:0==q&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){l="&from="+q;break}q=
+d.background;"png"!=c&&"pdf"!=c||!k?k||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==
b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+
" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,
b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var n=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;
-if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var F=x.attributes,D=0;D<F.length;D++)g.setAttributeForCell(v,F[D].nodeName,0<F[D].nodeValue.length?F[D].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+v.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(v,E)}catch(P){null!=window.console&&console.log("Error in style for "+v.id+": "+P)}try{var K=b.getAttribute("icon");if(null!=K){var L=0<K.length?JSON.parse(K):null;null!=
-L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=g.getCellGeometry(v);if(null!=J){J=J.clone();for(key in H){var A=parseFloat(H[key]);"dx"==key?J.x+=A:"dy"==key?J.y+=A:"dw"==key?J.width+=A:"dh"==key?J.height+=A:J[key]=parseFloat(H[key])}g.model.setGeometry(v,J)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+
+if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var D=x.attributes,C=0;C<D.length;C++)g.setAttributeForCell(v,D[C].nodeName,0<D[C].nodeValue.length?D[C].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+v.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(v,E)}catch(P){null!=window.console&&console.log("Error in style for "+v.id+": "+P)}try{var K=b.getAttribute("icon");if(null!=K){var L=0<K.length?JSON.parse(K):null;null!=
+L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=g.getCellGeometry(v);if(null!=J){J=J.clone();for(key in H){var B=parseFloat(H[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=B:"dh"==key?J.height+=B:J[key]=parseFloat(H[key])}g.model.setGeometry(v,J)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+
": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(n=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
1);b=b.nextSibling}}finally{k.endUpdate()}null!=n&&this.chromelessResize&&this.chromelessResize(!0,n)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,n=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+n+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};
EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
@@ -3411,56 +3412,56 @@ b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete t
u.message,label:"stack_"+u.stack})}catch(v){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,f=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");f.root=b[g].root;var n=e.encode(f);this.editor.graph.saveViewState(b[g].viewState,n,!0);n.removeAttribute("pageWidth");n.removeAttribute("pageHeight");k.appendChild(n);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,f){return!f||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
d&&"y"!=d&&"width"!=d&&"height"!=d?f&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,
-!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,p,n){};
+!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,q,n){};
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(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");
mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,
e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,
-function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;g=q.getAttribute("title");null!=g&&0<
-g.length&&".scratchpad"!=b.title&&q.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
-"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var D=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=D?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
-if(b.isEditable()){var E=this.editor.graph,K=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K),K=t.cloneNode(!1),K.setAttribute("src",Editor.spinImage),K.setAttribute("title",mxResources.get("saving")),K.style.cursor="default",K.style.marginRight="2px",K.style.marginTop="-2px",n.insertBefore(K,n.firstChild),q.style.paddingRight=
-18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=K&&null!=K.parentNode&&(K.parentNode.removeChild(K),q.style.paddingRight=18*n.childNodes.length+"px")})):null==D&&(D=t.cloneNode(!1),D.setAttribute("src",Editor.saveImage),D.setAttribute("title",mxResources.get("save")),n.insertBefore(D,n.firstChild),mxEvent.addListener(D,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-D||b.isModified()||(q.style.paddingRight=18*n.childNodes.length+"px",D.parentNode.removeChild(D),D=null)});mxEvent.consume(d)})),q.style.paddingRight=18*n.childNodes.length+"px")}),J=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
-w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;
+function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<
+g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
+"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var E=this.editor.graph,K=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K),K=t.cloneNode(!1),K.setAttribute("src",Editor.spinImage),K.setAttribute("title",mxResources.get("saving")),K.style.cursor="default",K.style.marginRight="2px",K.style.marginTop="-2px",n.insertBefore(K,n.firstChild),m.style.paddingRight=
+18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=K&&null!=K.parentNode&&(K.parentNode.removeChild(K),m.style.paddingRight=18*n.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),n.insertBefore(C,n.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+C||b.isModified()||(m.style.paddingRight=18*n.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*n.childNodes.length+"px")}),J=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;
c.y-=E.view.translate.y;J(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&
-(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,A(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
-"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,p,q,n,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,p,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
-JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(la){}else if("mxfile"==g.documentElement.nodeName)try{for(var p=g.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),n=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,n.width,n.height),b)}t=!0}catch(la){null!=window.console&&console.log("error in drop handler:",la)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(v,function(b){x(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
-k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));n.insertBefore(g,n.firstChild);mxEvent.addListener(g,"click",A);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(b)})),n.insertBefore(g,n.firstChild))}q.appendChild(n);q.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
+(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
+"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,p,q,n,u,x){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,p,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,t=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();v=!0}catch(la){}else if("mxfile"==g.documentElement.nodeName)try{for(var p=g.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),n=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,n.width,n.height),b)}v=!0}catch(la){null!=window.console&&console.log("error in drop handler:",la)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=x&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(x,function(b){t(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));n.insertBefore(g,n.firstChild);mxEvent.addListener(g,"click",B);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),n.insertBefore(g,n.firstChild))}m.appendChild(n);m.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.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="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-"#2a2a2a",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";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
+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.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";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",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(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,
mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position=
"absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,
-"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,p,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,
+"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,q,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,
b.columnNumber,b,"INFO")}catch(K){}if(null!=f||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){n=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=p?p:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=k?null:null!=q?q:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){p="#U"==p.substring(0,
+2)?p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,
function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?
-n=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?n=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(n=mxUtils.htmlEntities(f)))}var u=p=null;null!=f&&null!=f.helpLink&&(p=mxResources.get("help"),u=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,n,l,e,m,null,null,p,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
-null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,p);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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:"+
+n=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?n=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(n=mxUtils.htmlEntities(f)))}var u=q=null;null!=f&&null!=f.helpLink&&(q=mxResources.get("help"),u=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,n,l,e,m,null,null,q,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,q){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
+null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,q);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);
d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var q=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);q()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),q(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,
+l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,
-k,p){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(f?parseInt(f[2],10):!1)?!1:p}if(p||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));p?d.download=c:d.setAttribute("target",
-"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,p){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=p?"&base64="+p:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),F=0;n<t;++F,++n)x[F]=d[n].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,p,n,t){p=null!=p?p:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(p);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
+k,q){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(f?parseInt(f[2],10):!1)?!1:q}if(q||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));q?d.download=c:d.setAttribute("target",
+"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,q){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=q?"&base64="+q:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),D=0;n<t;++D,++n)x[D]=d[n].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,q,n,t){q=null!=q?q:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(q);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(K){this.handleError(K)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,n,null,1<k,d,b,e,g);p=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,420,p,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
+d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(K){this.handleError(K)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,n,null,1<k,d,b,e,g);q=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,420,q,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=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(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){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=
@@ -3473,242 +3474,246 @@ this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExp
this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.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(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,
null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=
-function(b,c,e,g,k,p,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){p=null!=p?p:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=g)try{this.exportFile(g,b,p,!0,d,e)}catch(K){this.handleError(K)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,p,!0,d,e)}catch(K){this.handleError(K)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,f,g,p,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,420,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,p){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,p,n,t,y,x,F,D,E,K){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=F?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,F,D);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg";K=null!=K?K:mxUtils.bind(this,function(b){this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));K(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);
-var u=mxUtils.bind(this,function(b){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});E?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(T){this.handleError(T)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,p,n){return this.addCheckbox(b,e,g,k,p,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,p,n,t){p=null!=p?p:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",
-n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");p&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),
+function(b,c,e,g,k,q,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){q=null!=q?q:"pdf"==c?"application/pdf":
+"image/"+c;if(null!=g)try{this.exportFile(g,b,q,!0,d,e)}catch(K){this.handleError(K)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,q,!0,d,e)}catch(K){this.handleError(K)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
+mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,f,g,q,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,420,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,q){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,q,n,t,y,x,D,C,E,K){if(this.spinner.spin(document.body,
+mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=D?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,D,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg";K=null!=K?K:mxUtils.bind(this,function(b){this.isLocalFileSave()||
+b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var p=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));K(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);
+var u=mxUtils.bind(this,function(b){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,p,this.thumbImageCache)):p(b)});E?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,q,n){return this.addCheckbox(b,e,g,k,q,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,q,n,t){q=null!=q?q:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",
+n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");q&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),
f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);
mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?
"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&
(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width=
-"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,p,n){n=null!=n?n:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&
-n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),p&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,g,k,p,n,t,y,x){y=this.createUrlParameters(b,c,e,g,k,p,y);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),
+"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,q,n){n=null!=n?n:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&
+n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),q&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,g,k,q,n,t,y,x){y=this.createUrlParameters(b,c,e,g,k,q,y);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),
t||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(y.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,p,n,t,y,x,F,D){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
-d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=F&&0<F.length&&(d.edit=F);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";D(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,q,n,t,y,x,D,C){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
+d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=D&&0<D.length&&(d.edit=D);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=
-document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(q);
-mxUtils.br(l);l.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));l.appendChild(q);var n=this.getCurrentFile();null==e&&null!=n&&n.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.style.cursor="pointer",mxUtils.write(q,mxResources.get("share")),l.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked",
-"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),D=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var K=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
-l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("tags"),!0),A=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,A),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&A.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
-mxUtils.bind(this,function(){g(k.checked?e:null,D.checked,E.value,t.getTarget(),t.getColor(),K.checked,L.checked,H.checked,J.checked,A.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,p){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));
-m.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));q.style.marginTop="12px";q.className="geBtn";m.appendChild(q);d.appendChild(m);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("check"));m.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
+document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);
+mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var n=this.getCurrentFile();null==e&&null!=n&&n.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked",
+"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var K=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
+l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,B),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
+mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,E.value,t.getTarget(),t.getColor(),K.checked,L.checked,H.checked,J.checked,B.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,q){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));
+m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight=
-"16px",n.style.marginBottom="10px",n.value="100%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var K=this.addLinkSection(d,p);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
-mxResources.get("lightbox"),!0,null,null,!p),J=this.addEditButton(d,H),A=J.getEditInput();p&&(A.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=A.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=A.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
-A.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(K.getTarget(),K.getColor(),null==L?!0:L.checked,H.checked,J.getLink(),M.checked,null!=n?n.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
+"16px",n.style.marginBottom="10px",n.value="100%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var K=this.addLinkSection(d,q);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
+mxResources.get("lightbox"),!0,null,null,!q),J=this.addEditButton(d,H),B=J.getEditInput();q&&(B.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=B.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=B.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
+B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(K.getTarget(),K.getColor(),null==L?!0:L.checked,H.checked,J.getLink(),M.checked,null!=n?n.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.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:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+
-":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var q=this.addCheckbox(d,
-mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!q.checked,null!=n?n.checked:!1,null!=
-t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,p,n,t,y){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=
-document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("selectionOnly"),
-!1,f.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var A=document.createElement("select");A.style.marginTop="16px";A.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
-b[m]);A.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(A),mxUtils.br(d),l+=26,mxEvent.addListener(A,"change",function(){"selectionOnly"==A.value&&(v.checked=!0)})):p&&(d.appendChild(J),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(v,"change",function(){v.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display=
-"none",l-=30):(A.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(v,"change",function(){A.value=v.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),Q=document.createElement("input");Q.style.marginTop="16px";Q.style.marginRight="8px";
-Q.setAttribute("type","checkbox");J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");c&&(d.appendChild(Q),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),d.appendChild(J),mxUtils.write(d,mxResources.get("embedFonts")),mxUtils.br(d),l+=60);var ga=null;if("png"==t||"jpeg"==t)ga=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),l+=30;var G=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);G.style.marginBottom="16px";var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));C.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
-mxResources.get("openInNewWindow"));C.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));C.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(C),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;k(q.value,P.checked,!v.checked,N.checked,G.checked,Q.checked,u.value,J.checked,!1,C.value,
-null!=ga?ga.checked:null,null!=T?T.checked:null,A.value,J.checked)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),E=this.addEditButton(d,t),K=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=K.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
-(L&&H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,q.checked,n.checked,t.checked,E.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(b,c,e,g,k,p,n,t){function d(d){var c=" ",m="";g&&(c=" 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!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",m+=
-"cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),
-null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,p,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";g&&(q="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"+(k?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),d.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!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,
+mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=n?n.checked:!1,null!=
+t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,q,n,t,y){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var p=
+document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";d.appendChild(p);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";d.appendChild(v);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("selectionOnly"),
+!1,f.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
+b[m]);B.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):q&&(d.appendChild(J),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
+"none",l-=30):(B.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";
+R.setAttribute("type","checkbox");J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),d.appendChild(J),mxUtils.write(d,mxResources.get("embedFonts")),mxUtils.br(d),l+=60);var ba=null;if("png"==t||"jpeg"==t)ba=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),l+=30;var F=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);F.style.marginBottom="16px";var I=document.createElement("select");I.style.maxWidth="260px";I.style.marginLeft="8px";I.style.marginRight="10px";I.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
+mxResources.get("openInNewWindow"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));I.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(I),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=p.value;k(p.value,P.checked,!u.checked,N.checked,F.checked,R.checked,v.value,J.checked,!1,I.value,
+null!=ba?ba.checked:null,null!=V?V.checked:null,B.value,J.checked)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),E=this.addEditButton(d,t),K=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=K.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
+(L&&H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,t.checked,E.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(b,c,e,g,k,q,n,t){function d(d){var c=" ",m="";g&&(c=" 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!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",m+=
+"cursor:pointer;");b&&(m+="max-width:100%;");var p="";e&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+d+'"'+p+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),
+null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,q,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var p=" ",t="";g&&(p="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"+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+p+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),d.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!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(b/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(b/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(b/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(b/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var d=null;if("diagram"==b.nodeName)d=
-b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(p){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
+b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(q){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
-!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var q=this.pages[0];this.currentPage==q?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=q.viewState&&null!=q.viewState&&d.setBackgroundImage(q.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?q.getName():"pagenumber"==b?1:m.apply(this,
-arguments)};document.body.appendChild(d.container);d.model.setRoot(q.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
-c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(F){null!=c&&c(F)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,p,n,t,y,x,F,D,E){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);p=c.getSvg(n,x,F,null,null,p,null,null,null,c.shadowVisible||D,null,E,"diagram");(c.shadowVisible||D)&&c.addSvgShadow(p);null!=b&&p.setAttribute("content",b);null!=e&&p.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
-"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(p);if(null!=k)this.embedFonts(p,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(p)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,
-function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(q){c(b)}}))}catch(l){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,e,g,k,p,n,t,y,x,F,D,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):
-null,y,null==this.pages||0==this.pages.length,F)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,p,n,x,D,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,p,n){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();
-try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!p){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&
-""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){p=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[L]=q[u].getAttribute("id");var J=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",
-[J+1]));f.model.execute(new ChangePage(this,H,H,J,!0));p.push(H)}this.updatePageLinks(b,p)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(A){if(k)throw A;this.handleError(A)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,
+!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&null!=p.viewState&&d.setBackgroundImage(p.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,
+arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
+c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,q,n,t,y,x,D,C,E){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);q=c.getSvg(n,x,D,null,null,q,null,null,null,c.shadowVisible||C,null,E,"diagram");(c.shadowVisible||C)&&c.addSvgShadow(q);null!=b&&q.setAttribute("content",b);null!=e&&q.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(q);if(null!=k)this.embedFonts(q,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(q)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,
+function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,e,g,k,q,n,t,y,x,D,C,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):
+null,y,null==this.pages||0==this.pages.length,D)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,q,n,x,C,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,q,n){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();
+try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length&&!q){if(m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(b[p[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=p[0].getAttribute("name");null!=t&&
+""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<p.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),g=!1,u=1);for(;u<p.length;u++){var L=p[u].getAttribute("id");p[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(p[u]));b[L]=p[u].getAttribute("id");var J=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",
+[J+1]));f.model.execute(new ChangePage(this,H,H,J,!0));q.push(H)}this.updatePageLinks(b,q)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;this.handleError(B)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,
c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,n=0;n<g.length;n++)f=g[n].getAttribute("href"),null!=f&&(g[n].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(b,
e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c=
"data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+
-1).toUpperCase();else{var m=g.lastIndexOf("/");0<=m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(D){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));
+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));
p.responseType="blob";this.addRemoteServiceSecurityCheck(p);null!=k&&p.setRequestHeader("x-convert-custom",k);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var b=p.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(K){e(K)}else try{""==p.responseType||"text"==p.responseType?
-e({message:p.responseText}):(d=new FileReader,d.onload=function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(K){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(D){e(D)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=
-e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(m){e(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=
+e({message:p.responseText}):(d=new FileReader,d.onload=function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(K){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=
+e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(p){e(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=
!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(m){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(m){null!=window.console&&console.error(m),e(m)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=
+function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(p){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(p){null!=window.console&&console.error(p),e(p)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,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",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",
c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=b.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(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),
-f=parseFloat(k[2]),l=parseFloat(k[3])}catch(D){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(D){g(D)}})}catch(u){g(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&
+f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&
15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),
0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");
-0<p.length&&(b=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}e(d.result,b,f)}catch(A){g(A)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=
-function(b,c,e,g,k,p,n,t){p=null!=p?p:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=
-this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,p,!0,t)}if("data:image/png;base64,"==b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,p,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,
-!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,p,!0,t);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);
+0<p.length&&(b=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}e(d.result,b,f)}catch(B){g(B)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=
+function(b,c,e,g,k,n,t,v){n=null!=n?n:!0;t=null!=t?t:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=
+this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,v)}if("data:image/png;base64,"==b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,
+!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,v);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),t,this.maxImageSize);
else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":
-"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,e,p,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,p,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;
+"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,e,n,null,v);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,v))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;
d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=
m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",
d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,
function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,
function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,
0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?
-JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,
-function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,p,n,t,y,x,F,D){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):d=this.importXml(b,
-e,g,x,null,null!=D?mxEvent.isControlDown(D):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=F?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=D?mxEvent.isControlDown(D):null),y=!0)),y||(c=this.editor.graph,F=b.indexOf(";"),0<F&&(b=b.substring(0,F)+b.substring(b.indexOf(",",F+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),n)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,
-l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=D?mxEvent.isControlDown(D):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,p,n,t,y,x,F,D,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=b)for(var m=F||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,p,d,D,E)}catch(Y){return this.handleError(Y),null}});p=null!=p?p:mxUtils.bind(this,function(b){l.setSelectionCells(b)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],A=mxUtils.bind(this,function(b,d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}p(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var p=b[d];if(null!=p){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(p))if("image/"==p.type.substring(0,
-6))if("image/svg"==p.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=D?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?A(d,
-mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],n=f.getAttribute("width"),u=f.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+n+" "+u);else if(isNaN(n)||isNaN(u)){var A=x.split(" ");3<A.length&&(n=parseFloat(A[2]),u=parseFloat(A[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));
-var N=Math.min(1,Math.min(g/Math.max(1,n)),g/Math.max(1,u)),D=k(q,p.type,c+d*m,e+d*m,Math.max(1,Math.round(n*N)),Math.max(1,Math.round(u*N)),p.name);if(isNaN(n)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){n=Math.max(1,y.width);u=Math.max(1,y.height);D[0].geometry.width=n;D[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+n+" "+u);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",
-q,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ea){}return null})):A(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var y=D?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var B=new Image;B.src=b.target.result;A(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,B.width,B.height,p.name)}));u=!0}}u||(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(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){A(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,F)?Math.min(1,Math.min(g/
-l,g/n)):1;return k(b,p.type,c+d*m,e+d*m,Math.round(l*q),Math.round(n*q),p.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,g,F,p.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,function(){return b})},p)});/(\.v(dx|sdx?))($|\?)/i.test(p.name)||/(\.vs(x|sx?))($|\?)/i.test(p.name)?k(null,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,
-function(){return b})},p):"image"==p.type.substring(0,5)||"application/pdf"==p.type?q.readAsDataURL(p):q.readAsText(p)}})(y)});if(l){l=[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?
+JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,k,l=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,k=d))});0<g?k.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):l||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,t,v,y,x,D,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,t)):d=this.importXml(b,
+e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=v&&v(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,D=b.indexOf(";"),0<D&&(b=b.substring(0,D)+b.substring(b.indexOf(",",D+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=v&&v(null))}),t)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,
+l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);v(f)}))):/(\.v(sd|dx))($|\?)/i.test(t)||/(\.vs(s|x))($|\?)/i.test(t)||(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==v||v(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,t,v,y,x,D,C,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&
+null!=b)for(var m=D||this.resampleThreshold,p=0;p<b.length;p++)if("image/"==b[p].type.substring(0,6)&&b[p].size>m){l=!0;break}var q=mxUtils.bind(this,function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,k,l,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,l)),null):this.importFile(b,c,e,f,g,k,l,m,p,d,C,E)}catch(oa){return this.handleError(oa),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=b.length,q=p,u=[],B=mxUtils.bind(this,function(b,d){u[b]=d;if(0==--q){this.spinner.stop();if(null!=v)v(u);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var f=u[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<p;y++)mxUtils.bind(this,function(d){var p=b[d];if(null!=p){var n=new FileReader;n.onload=mxUtils.bind(this,function(b){if(null==t||t(p))if("image/"==p.type.substring(0,
+6))if("image/svg"==p.type.substring(0,9)){var n=Graph.clipSvgDataUri(b.target.result),q=n.indexOf(","),u=decodeURIComponent(escape(atob(n.substring(q+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?B(d,
+mxUtils.bind(this,function(){try{if(n.substring(0,q+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],t=f.getAttribute("width"),x=f.getAttribute("height"),t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+t+" "+x);else if(isNaN(t)||isNaN(x)){var B=u.split(" ");3<B.length&&(t=parseFloat(B[2]),x=parseFloat(B[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));
+var N=Math.min(1,Math.min(g/Math.max(1,t)),g/Math.max(1,x)),C=k(n,p.type,c+d*m,e+d*m,Math.max(1,Math.round(t*N)),Math.max(1,Math.round(x*N)),p.name);if(isNaN(t)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){t=Math.max(1,y.width);x=Math.max(1,y.height);C[0].geometry.width=t;C[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+t+" "+x);n=Editor.createSvgDataUri(mxUtils.getXml(f));var b=n.indexOf(";");0<b&&(n=n.substring(0,b)+n.substring(n.indexOf(",",b+1)));l.setCellStyles("image",
+n,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(ea){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var A=new Image;A.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,A.width,A.height,p.name)}));u=!0}}u||(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(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,D)?Math.min(1,Math.min(g/
+l,g/n)):1;return k(b,p.type,c+d*m,e+d*m,Math.round(l*q),Math.round(n*q),p.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,g,D,p.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=b.target.result,k(n,p.type,c+d*m,e+d*m,240,160,p.name,function(b){B(d,function(){return b})},p)});/(\.v(dx|sdx?))($|\?)/i.test(p.name)||/(\.vs(x|sx?))($|\?)/i.test(p.name)?k(null,p.type,c+d*m,e+d*m,240,160,p.name,function(b){B(d,
+function(){return b})},p):"image"==p.type.substring(0,5)||"application/pdf"==p.type?n.readAsDataURL(p):n.readAsText(p)}})(y)});if(l){l=[];for(p=0;p<b.length;p++)l.push(b[p]);b=l;this.confirmImageResize(function(b){f=b;q()},y)}else q()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?
f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){f(b,!0)},function(b){f(b,!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):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,
-e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,p,n){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);
-if(g&&this.isResampleImageSize(null!=n?n:c.length,p))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(J){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
-function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(m){if(null!=e)e(m);else throw m;}};var g=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:
-"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==
-g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);
-e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},
-function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};
-c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var m=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));m.apply(this,
+e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,t){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);
+if(g&&this.isResampleImageSize(null!=t?t:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),p=Math.round(f/l),q=document.createElement("canvas");q.width=m;q.height=p;q.getContext("2d").drawImage(b,0,0,m,p);var u=q.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=p;var H=L.toDataURL();u!==H&&(c=u,d=m,f=p)}}}catch(J){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
+function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(p){if(null!=e)e(p);else throw p;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&"1"!=urlParams.embedInline&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:
+"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==
+g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);
+e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},
+function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(V){b.handleError(V)}};
+c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));p.apply(this,
arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();
-break}}}));var p=c.getBackgroundImageObject;c.getBackgroundImageObject=function(d,c){var e=p.apply(this,arguments);if(null!=e&&null!=e.originalSrc)if(!c)e={src:e.originalSrc};else if(c&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var f=this.stylesheet;this.stylesheet=this.getDefaultStylesheet();e=b.createImageForPageLink(e.originalSrc);this.stylesheet=f}return e};var n=this.clearDefaultStyle;this.clearDefaultStyle=function(){n.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 t=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return t.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;
+break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(d,c){var e=n.apply(this,arguments);if(null!=e&&null!=e.originalSrc)if(!c)e={src:e.originalSrc};else if(c&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var f=this.stylesheet;this.stylesheet=this.getDefaultStylesheet();e=b.createImageForPageLink(e.originalSrc);this.stylesheet=f}return e};var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.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 v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;
d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?
-x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var F=c.getExportVariables;c.getExportVariables=function(){var d=F.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=
-b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var D=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};var E=c.labelLinkClicked;
+x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var D=c.getExportVariables;c.getExportVariables=function(){var d=D.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=
+b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var E=c.labelLinkClicked;
c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))E.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var K=this.actions.get("print");K.setEnabled(!mxClient.IS_IOS||
!navigator.standalone);K.visible=K.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.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();
-b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");
+b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,k){c.insertImage(b,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");
/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,
"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));this.isSettingsEnabled()&&(K=this.editor.graph.view,K.setUnit(mxSettings.getUnit()),K.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.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,
K.unit),this.refresh());if("1"==urlParams.styledev){K=document.getElementById("geFooter");null!=K&&(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)})),K.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
this.styleInput?!0:L.apply(this,arguments)}}K=document.getElementById("geInfo");null!=K&&K.parentNode.removeChild(K);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,
-g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=
-c.sanitizeHtml(m);var p=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=
-m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",
-mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=
+null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,k=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=g=null),this.importFiles(b.dataTransfer.files,
+g,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=g=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=
+c.sanitizeHtml(m);var p=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,k,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=
+m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,g,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,k,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",
+mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,k){b.insertImage(d,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=
this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML="&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck",
"false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",
c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),
this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,
-!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);mxSettings.settings.sketchMode=b;mxSettings.save();this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(b){Editor.pagesVisible!=
-b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.doSetSketchMode=function(b){if(Editor.sketchMode!=b){var d=this.editor.graph;Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=20;d.defaultVertexStyle={pointerEvents:"0",fontSize:"20"};d.defaultEdgeStyle={fontSize:"16",edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
-endArrow:"open",endSize:"14",startSize:"14"};b&&(d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.hachureGap="4",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8",this.menus.defaultFonts=
-[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(this.menus.defaultFonts));this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=
-mxUtils.clone(d.defaultEdgeStyle);Graph.prototype.defaultVertexStyle=d.defaultVertexStyle;Graph.prototype.defaultEdgeStyle=d.defaultEdgeStyle;this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=
-function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};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(b){b.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(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);
-else{var d=c.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(b,c){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(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){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(b,c){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(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));
-this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+
-1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=
-f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,
-d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=
-d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),
-k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var n=decodeURIComponent(l);this.isCompatibleString(n)&&(k=!0,l=n)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),
-null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var q=f.lastIndexOf("%3E");0<=q&&q<
-f.length-3&&(f=f.substring(0,q+3))}catch(D){}try{l=d.getElementsByTagName("span"),n=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(n)&&(k=!0,f=n)}catch(D){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(D){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=0}}catch(D){this.handleError(D)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=
-null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&
-(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?
-c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),
-null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";
-k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,
-e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&
-!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();
-this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),
-mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;
-d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==
-c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)&&null!=d&&d.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(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.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 b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),
-this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),
-d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&
-(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(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);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,
-b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
-this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,e=!1,g=null,k=mxUtils.bind(this,function(b,d){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,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==
-b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(qa){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(V){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):
-k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var p=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(p.container,
-300,80,!0,!1);p.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):
-null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(V){n.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&
-!k.templatesOnly&&null!=k.callback){var A=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=A?A.id:null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,
-u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=
-d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",
-[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==k.action){var P=
-this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,T):
-this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var Q=this.editor.graph,ga=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=k.format;d.message=k;d.data=b;d.xml=N;n.postMessage(JSON.stringify(d),
-"*")}),G=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);ga(b)}),C=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var B=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=C){var b=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());
-for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==C){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);Q.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=Q.model,f=e.getChildCells(e.getRoot()),g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){G(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){G(null)}),null,null,k.scale,k.transparent,k.shadow,null,Q,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(N),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(B)},0):B()):B()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=C?"&pageId="+C:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+
-encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?ga("data:image/png;base64,"+b.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else B=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=
-this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,
-function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);n.postMessage(JSON.stringify(b),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):
-k.spin))this.editor.graph.setEnabled(!1),d=this.editor.graph.getSvg(d,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme),(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):c(mxUtils.getXml(b))}));return}n.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&
-0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(B)},0):B()):B();return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&
-(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(V){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var U=this.getCurrentFile();
-null!=U&&(q=l(k.xml),null!=q&&""!=q&&U.mergeFile(new LocalFile(this,q),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),
-"*");return}}catch(V){this.handleError(V)}}var I=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ba=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(ja){this.handleError(ja)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=I();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=I();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),
-"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",
-d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;n.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){ba(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===
-typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&ba(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){ba(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==
-k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),ba(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){ba(I(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);
-n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g=
-"1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&
-(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",
-e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
-":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=
-b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g=[],k={};if(0<d.length){var n={},t=null,x=null,F=null,D=null,E=null,K=null,L="whiteSpace=wrap;html=1;",H=null,J=null,A="",M="auto",P="auto",T=null,N=null,Q=40,ga=40,G=100,C=0,B=this.editor.graph;B.getGraphBounds();for(var U=function(){null!=c?c(va):(B.setSelectionCells(va),B.scrollCellToVisible(B.getSelectionCell()))},
-I=B.getFreeInsertPoint(),ba=I.x,V=I.y,I=V,qa=null,ma="auto",J=null,ja=[],na=null,Y=null,ka=0;ka<d.length&&"#"==d[ka].charAt(0);){b=d[ka];for(ka++;ka<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ka].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ka].substring(1)),ka++;if("#"!=b.charAt(1)){var la=b.indexOf(":");if(0<la){var ca=mxUtils.trim(b.substring(1,la)),R=mxUtils.trim(b.substring(la+1));"label"==ca?qa=B.sanitizeHtml(R):"labelname"==ca&&0<R.length&&"-"!=R?E=R:"labels"==ca&&0<R.length&&"-"!=
-R?K=JSON.parse(R):"style"==ca?x=R:"parentstyle"==ca?L=R:"stylename"==ca&&0<R.length&&"-"!=R?D=R:"styles"==ca&&0<R.length&&"-"!=R?F=JSON.parse(R):"vars"==ca&&0<R.length&&"-"!=R?t=JSON.parse(R):"identity"==ca&&0<R.length&&"-"!=R?H=R:"parent"==ca&&0<R.length&&"-"!=R?J=R:"namespace"==ca&&0<R.length&&"-"!=R?A=R:"width"==ca?M=R:"height"==ca?P=R:"left"==ca&&0<R.length?T=R:"top"==ca&&0<R.length?N=R:"ignore"==ca?Y=R.split(","):"connect"==ca?ja.push(JSON.parse(R)):"link"==ca?na=R:"padding"==ca?C=parseFloat(R):
-"edgespacing"==ca?Q=parseFloat(R):"nodespacing"==ca?ga=parseFloat(R):"levelspacing"==ca?G=parseFloat(R):"layout"==ca&&(ma=R)}}}if(null==d[ka])throw Error(mxResources.get("invalidOrMissingFile"));for(var Z=this.editor.csvToArray(d[ka]),ca=la=null,R=[],W=0;W<Z.length;W++)H==Z[W]&&(la=W),J==Z[W]&&(ca=W),R.push(mxUtils.trim(Z[W]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==qa&&(qa="%"+R[0]+"%");if(null!=ja)for(var da=0;da<ja.length;da++)null==n[ja[da].to]&&(n[ja[da].to]={});
-H=[];for(W=ka+1;W<d.length;W++){var ia=this.editor.csvToArray(d[W]);if(null==ia){var ta=40<d[W].length?d[W].substring(0,40)+"...":d[W];throw Error(ta+" ("+W+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&H.push(ia)}B.model.beginUpdate();try{for(W=0;W<H.length;W++){var ia=H[W],S=null,ea=null!=la?A+ia[la]:null;null!=ea&&(S=B.model.getCell(ea));var d=null!=S,ha=new mxCell(qa,new mxGeometry(ba,I,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;for(var O=0;O<ia.length;O++)B.setAttributeForCell(ha,
-R[O],ia[O]);if(null!=E&&null!=K){var aa=K[ha.getAttribute(E)];null!=aa&&B.labelChanged(ha,aa)}if(null!=D&&null!=F){var ra=F[ha.getAttribute(D)];null!=ra&&(ha.style=ra)}B.setAttributeForCell(ha,"placeholders","1");ha.style=B.replacePlaceholders(ha,ha.style,t);d?(B.model.setValue(S,ha.value),B.model.setStyle(S,ha.style),0>mxUtils.indexOf(g,S)&&g.push(S),B.fireEvent(new mxEventObject("cellsInserted","cells",[S]))):B.fireEvent(new mxEventObject("cellsInserted","cells",[ha]));S=ha;if(!d)for(da=0;da<ja.length;da++)n[ja[da].to][S.getAttribute(ja[da].to)]=
-S;null!=na&&"link"!=na&&(B.setLinkForCell(S,S.getAttribute(na)),B.setAttributeForCell(S,na,null));var ua=this.editor.graph.getPreferredSizeForCell(S),J=null!=ca?B.model.getCell(A+ia[ca]):null;if(S.vertex){ta=null!=J?0:ba;ka=null!=J?0:V;null!=T&&null!=S.getAttribute(T)&&(S.geometry.x=ta+parseFloat(S.getAttribute(T)));null!=N&&null!=S.getAttribute(N)&&(S.geometry.y=ka+parseFloat(S.getAttribute(N)));var oa="@"==M.charAt(0)?S.getAttribute(M.substring(1)):null;S.geometry.width=null!=oa&&"auto"!=oa?parseFloat(S.getAttribute(M.substring(1))):
-"auto"==M||"auto"==oa?ua.width+C:parseFloat(M);var xa="@"==P.charAt(0)?S.getAttribute(P.substring(1)):null;S.geometry.height=null!=xa&&"auto"!=xa?parseFloat(xa):"auto"==P||"auto"==xa?ua.height+C:parseFloat(P);I+=S.geometry.height+ga}d?(null==k[ea]&&(k[ea]=[]),k[ea].push(S)):(e.push(S),null!=J?(J.style=B.replacePlaceholders(J,L,t),B.addCell(S,J),f.push(J)):g.push(B.addCell(S)))}for(W=0;W<f.length;W++)oa="@"==M.charAt(0)?f[W].getAttribute(M.substring(1)):null,xa="@"==P.charAt(0)?f[W].getAttribute(P.substring(1)):
-null,"auto"!=M&&"auto"!=oa||"auto"!=P&&"auto"!=xa||B.updateGroupBounds([f[W]],C,!0);for(var Aa=g.slice(),va=g.slice(),da=0;da<ja.length;da++)for(var Ha=ja[da],W=0;W<e.length;W++){var S=e[W],Ia=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(B.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=n[c.to][e[f]];if(null!=g){var k=c.label;null!=c.fromlabel&&(k=(d.getAttribute(c.fromlabel)||"")+(k||""));null!=c.sourcelabel&&(k=B.replacePlaceholders(d,
-c.sourcelabel,t)+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(k=(k||"")+B.replacePlaceholders(g,c.targetlabel,t));var l="target"==c.placeholders==!c.invert?g:b,l=null!=c.style?B.replacePlaceholders(l,c.style,t):B.createCurrentEdgeStyle(),k=B.insertEdge(null,null,k||"",c.invert?g:b,c.invert?b:g,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],p=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");
-p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=m.placeholders&&(p.value=B.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,p.value,t));if(null!=m.dx||null!=m.dy)p.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(p)}va.push(k);mxUtils.remove(c.invert?b:g,Aa)}}});Ia(S,S,Ha);if(null!=k[S.id])for(O=0;O<k[S.id].length;O++)Ia(S,k[S.id][O],Ha)}if(null!=Y)for(W=0;W<e.length;W++)for(S=e[W],O=0;O<Y.length;O++)B.setAttributeForCell(S,mxUtils.trim(Y[O]),null);if(0<
-g.length){var Ca=new mxParallelEdgeLayout(B);Ca.spacing=Q;Ca.checkOverlap=!0;var Da=function(){0<Ca.spacing&&Ca.execute(B.getDefaultParent());for(var b=0;b<g.length;b++){var d=B.getCellGeometry(g[b]);d.x=Math.round(B.snap(d.x));d.y=Math.round(B.snap(d.y));"auto"==M&&(d.width=Math.round(B.snap(d.width)));"auto"==P&&(d.height=Math.round(B.snap(d.height)))}};if("["==ma.charAt(0)){var Ja=U;B.view.validate();this.executeLayoutList(JSON.parse(ma),function(){Da();Ja()});U=null}else if("circle"==ma){var ya=
-new mxCircleLayout(B);ya.disableEdgeStyle=!1;ya.resetEdges=!1;var Ea=ya.isVertexIgnored;ya.isVertexIgnored=function(b){return Ea.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){ya.execute(B.getDefaultParent());Da()},!0,U);U=null}else if("horizontaltree"==ma||"verticaltree"==ma||"auto"==ma&&va.length==2*g.length-1&&1==Aa.length){B.view.validate();var za=new mxCompactTreeLayout(B,"horizontaltree"==ma);za.levelDistance=ga;za.edgeRouting=!1;za.resetEdges=!1;this.executeLayout(function(){za.execute(B.getDefaultParent(),
-0<Aa.length?Aa[0]:null)},!0,U);U=null}else if("horizontalflow"==ma||"verticalflow"==ma||"auto"==ma&&1==Aa.length){B.view.validate();var X=new mxHierarchicalLayout(B,"horizontalflow"==ma?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);X.intraCellSpacing=ga;X.parallelEdgeSpacing=Q;X.interRankCellSpacing=G;X.disableEdgeStyle=!1;this.executeLayout(function(){X.execute(B.getDefaultParent(),va);B.moveCells(va,ba,V)},!0,U);U=null}else if("organic"==ma||"auto"==ma&&va.length>g.length){B.view.validate();
-var wa=new mxFastOrganicLayout(B);wa.forceConstant=3*ga;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Na=wa.isVertexIgnored;wa.isVertexIgnored=function(b){return Na.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){wa.execute(B.getDefaultParent());Da()},!0,U);U=null}}this.hideDialog()}finally{B.model.endUpdate()}null!=U&&U()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c=
-"?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+
-urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&
-"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);
-this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);
-this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),
-g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=
-this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,n)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),p=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA)if(b.hideDialog(),
-"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+p+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,
-null==g||"none"==g,!0,!1,!1,n,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+
-" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);null==urlParams.rough&&(mxSettings.settings.sketchMode=b,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
+function(b){Editor.pagesVisible!=b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setInlineFullscreen=function(b){Editor.inlineFullscreen!=b&&(Editor.inlineFullscreen=b,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(b){if(Editor.sketchMode!=b){var d=this.editor.graph;Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=b?20:16;d.defaultVertexStyle={pointerEvents:"0",fontSize:this.menus.defaultFontSize};d.defaultEdgeStyle={fontSize:this.menus.defaultFontSize-4,edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",endSize:"14",startSize:"14"};b&&(d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.hachureGap="4",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
+"8",this.menus.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(this.menus.defaultFonts));this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);
+d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);Graph.prototype.defaultVertexStyle=d.defaultVertexStyle;Graph.prototype.defaultEdgeStyle=d.defaultEdgeStyle;this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};
+EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};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(b){b.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(b,
+c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.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(b,c){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(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){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(b,c){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(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();
+var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(m){this.handleError(m)}};
+EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));
+mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=
+function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,k,k),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,
+b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+k,f.y+k,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=
+c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),f="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,l))}k=d.getElementsByTagName("span");if(null!=
+k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))e=k[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{f=
+f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var n=f.lastIndexOf("%3E");0<=n&&n<f.length-3&&(f=f.substring(0,n+3))}catch(C){}try{k=d.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(l=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=
+0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(d=
+this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);
+if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,
+"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):
+window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");
+k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);
+b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+
+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,
+mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,
+c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==
+b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=
+0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),
+f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)&&null!=d&&d.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(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.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 b={};if(null!=this.pages)for(var c=
+0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&
+(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=
+b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(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 b=!1;this.installMessageHandler(mxUtils.bind(this,function(d,c,e,g){b||(b=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
+if(null==d||0==d.length)d=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,d,{}));this.mode=App.MODE_EMBED;this.setFileData(d);if(g)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var k=f.model.cells,l;for(l in k){var m=k[l];null!=m&&null!=m.style&&(m.style+=";sketch=1;"+(-1==m.style.indexOf("fontFamily=")||-1<m.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(){this.getEmbeddedSvg(this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1),this.editor.graph,null,!0,mxUtils.bind(this,function(b){this.editor.modified=!1;(window.opener||window.parent).postMessage(JSON.stringify({event:"export",data:Editor.createSvgDataUri(b)}),"*")}),null,null,!0,null,1,8);this.diagramContainer.removeAttribute("data-bounds");Editor.inlineFullscreen=!1;this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);this.editor.modified=!1;this.fireEvent(new mxEventObject("editInlineStop"))};
+EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,e=!1,g=null,k=mxUtils.bind(this,function(b,d){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,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=null,m=mxUtils.bind(this,
+function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(na){}return b});if("json"==urlParams.proto){var p=!1;try{k=JSON.parse(k)}catch(fa){k=null}try{if(null==k)return;
+if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var q=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",
+value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(q.container,300,80,!0,!1);q.init();return}if("draft"==k.action){var t=m(k.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),t,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();
+n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(fa){n.postMessage(JSON.stringify({event:"draft",error:fa.toString(),
+message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var u=1==k.enableRecent,v=1==k.enableSearch,B=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var y=this.getCurrentUser(),P=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,
+function(){this.actions.get("exit").funct()}),null,null,null!=y?y.id:null,u?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,v?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(P.container,
+window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",
+[null],null,b,function(){b(null,"Network Error!")})}):null,v?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,
+function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==k.action){var V=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:V,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var N=
+null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,N):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var R=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ba=this.editor.graph,F=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();
+var d=this.createLoadMessage("export");d.format=k.format;d.message=k;d.data=b;d.xml=R;n.postMessage(JSON.stringify(d),"*")}),I=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(R)));ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,
+function(){if(null!=this.pages&&this.currentPage.getId()!=A){var b=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==A){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);ba.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(ba.container);ba.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=ba.model,f=e.getChildCells(e.getRoot()),
+g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){I(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){I(null)}),null,null,k.scale,k.transparent,k.shadow,null,ba,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(R),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(S)},0):S()):
+S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):I(null)}),mxUtils.bind(this,function(){I(null)}))}}else S=mxUtils.bind(this,function(){var b=
+this.createLoadMessage("export");b.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;
+d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);n.postMessage(JSON.stringify(b),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,k.scale,
+k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),d=this.editor.graph.getSvg(d,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme),(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,
+mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):c(mxUtils.getXml(b))}));return}n.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(S)},0):S()):S();return}if("load"==k.action){p=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=
+k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);if(null!=k.rough){var G=Editor.sketchMode;this.doSetSketchMode(k.rough);G!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=k.dark&&(G=Editor.darkMode,this.doSetDarkMode(k.dark),G!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=k.rect&&(this.diagramContainer.style.border="2px solid #295fcc",this.diagramContainer.style.top=k.rect.top+"px",this.diagramContainer.style.left=
+k.rect.left+"px",this.diagramContainer.style.height=k.rect.height+"px",this.diagramContainer.style.width=k.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",l=mxUtils.bind(this,function(){var b=this.editor.graph,d=b.maxFitScale;b.maxFitScale=1;b.fit(20);b.maxFitScale=d;b.container.scrollTop-=20;b.container.scrollLeft-=20;this.fireEvent(new mxEventObject("editInlineStart","data",[k]))}));null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);
+null!=k.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(fa){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var X=this.getCurrentFile();null!=X&&(t=m(k.xml),null!=t&&""!=
+t&&X.mergeFile(new LocalFile(this,t),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(fa){this.handleError(fa)}}var ca=
+mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ma=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,p)}catch(oa){this.handleError(oa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=ca();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=ca();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=
+e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),
+this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;n.postMessage(JSON.stringify(m),"*")}null!=l&&l()});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){ma(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=k&&
+"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&ma(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){ma(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
+null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=m(k),ma(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){ma(ca(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,
+arguments);n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),
+"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,
+e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
+mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);
+if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g=[],k={};if(0<d.length){var n={},t=null,x=null,D=null,C=null,E=null,K=null,L="whiteSpace=wrap;html=1;",H=null,J=null,B="",M="auto",P="auto",V=null,N=null,R=40,ba=40,F=100,I=0,A=this.editor.graph;A.getGraphBounds();for(var S=function(){null!=c?c(pa):(A.setSelectionCells(pa),
+A.scrollCellToVisible(A.getSelectionCell()))},G=A.getFreeInsertPoint(),X=G.x,ca=G.y,G=ca,ma=null,fa="auto",J=null,na=[],ka=null,oa=null,Z=0;Z<d.length&&"#"==d[Z].charAt(0);){b=d[Z];for(Z++;Z<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[Z].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[Z].substring(1)),Z++;if("#"!=b.charAt(1)){var la=b.indexOf(":");if(0<la){var aa=mxUtils.trim(b.substring(1,la)),T=mxUtils.trim(b.substring(la+1));"label"==aa?ma=A.sanitizeHtml(T):"labelname"==aa&&0<T.length&&
+"-"!=T?E=T:"labels"==aa&&0<T.length&&"-"!=T?K=JSON.parse(T):"style"==aa?x=T:"parentstyle"==aa?L=T:"stylename"==aa&&0<T.length&&"-"!=T?C=T:"styles"==aa&&0<T.length&&"-"!=T?D=JSON.parse(T):"vars"==aa&&0<T.length&&"-"!=T?t=JSON.parse(T):"identity"==aa&&0<T.length&&"-"!=T?H=T:"parent"==aa&&0<T.length&&"-"!=T?J=T:"namespace"==aa&&0<T.length&&"-"!=T?B=T:"width"==aa?M=T:"height"==aa?P=T:"left"==aa&&0<T.length?V=T:"top"==aa&&0<T.length?N=T:"ignore"==aa?oa=T.split(","):"connect"==aa?na.push(JSON.parse(T)):
+"link"==aa?ka=T:"padding"==aa?I=parseFloat(T):"edgespacing"==aa?R=parseFloat(T):"nodespacing"==aa?ba=parseFloat(T):"levelspacing"==aa?F=parseFloat(T):"layout"==aa&&(fa=T)}}}if(null==d[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[Z]),aa=la=null,T=[],Q=0;Q<ra.length;Q++)H==ra[Q]&&(la=Q),J==ra[Q]&&(aa=Q),T.push(mxUtils.trim(ra[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+T[0]+"%");if(null!=na)for(var da=0;da<na.length;da++)null==
+n[na[da].to]&&(n[na[da].to]={});H=[];for(Q=Z+1;Q<d.length;Q++){var ia=this.editor.csvToArray(d[Q]);if(null==ia){var wa=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(wa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&H.push(ia)}A.model.beginUpdate();try{for(Q=0;Q<H.length;Q++){var ia=H[Q],U=null,ea=null!=la?B+ia[la]:null;null!=ea&&(U=A.model.getCell(ea));var d=null!=U,ha=new mxCell(ma,new mxGeometry(X,G,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;
+for(var ja=0;ja<ia.length;ja++)A.setAttributeForCell(ha,T[ja],ia[ja]);if(null!=E&&null!=K){var O=K[ha.getAttribute(E)];null!=O&&A.labelChanged(ha,O)}if(null!=C&&null!=D){var Y=D[ha.getAttribute(C)];null!=Y&&(ha.style=Y)}A.setAttributeForCell(ha,"placeholders","1");ha.style=A.replacePlaceholders(ha,ha.style,t);d?(A.model.setValue(U,ha.value),A.model.setStyle(U,ha.style),0>mxUtils.indexOf(g,U)&&g.push(U),A.fireEvent(new mxEventObject("cellsInserted","cells",[U]))):A.fireEvent(new mxEventObject("cellsInserted",
+"cells",[ha]));U=ha;if(!d)for(da=0;da<na.length;da++)n[na[da].to][U.getAttribute(na[da].to)]=U;null!=ka&&"link"!=ka&&(A.setLinkForCell(U,U.getAttribute(ka)),A.setAttributeForCell(U,ka,null));var xa=this.editor.graph.getPreferredSizeForCell(U),J=null!=aa?A.model.getCell(B+ia[aa]):null;if(U.vertex){wa=null!=J?0:X;Z=null!=J?0:ca;null!=V&&null!=U.getAttribute(V)&&(U.geometry.x=wa+parseFloat(U.getAttribute(V)));null!=N&&null!=U.getAttribute(N)&&(U.geometry.y=Z+parseFloat(U.getAttribute(N)));var ua="@"==
+M.charAt(0)?U.getAttribute(M.substring(1)):null;U.geometry.width=null!=ua&&"auto"!=ua?parseFloat(U.getAttribute(M.substring(1))):"auto"==M||"auto"==ua?xa.width+I:parseFloat(M);var sa="@"==P.charAt(0)?U.getAttribute(P.substring(1)):null;U.geometry.height=null!=sa&&"auto"!=sa?parseFloat(sa):"auto"==P||"auto"==sa?xa.height+I:parseFloat(P);G+=U.geometry.height+ba}d?(null==k[ea]&&(k[ea]=[]),k[ea].push(U)):(e.push(U),null!=J?(J.style=A.replacePlaceholders(J,L,t),A.addCell(U,J),f.push(J)):g.push(A.addCell(U)))}for(Q=
+0;Q<f.length;Q++)ua="@"==M.charAt(0)?f[Q].getAttribute(M.substring(1)):null,sa="@"==P.charAt(0)?f[Q].getAttribute(P.substring(1)):null,"auto"!=M&&"auto"!=ua||"auto"!=P&&"auto"!=sa||A.updateGroupBounds([f[Q]],I,!0);for(var va=g.slice(),pa=g.slice(),da=0;da<na.length;da++)for(var Ba=na[da],Q=0;Q<e.length;Q++){var U=e[Q],Ca=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=n[c.to][e[f]];
+if(null!=g){var k=c.label;null!=c.fromlabel&&(k=(d.getAttribute(c.fromlabel)||"")+(k||""));null!=c.sourcelabel&&(k=A.replacePlaceholders(d,c.sourcelabel,t)+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(k=(k||"")+A.replacePlaceholders(g,c.targetlabel,t));var l="target"==c.placeholders==!c.invert?g:b,l=null!=c.style?A.replacePlaceholders(l,c.style,t):A.createCurrentEdgeStyle(),k=A.insertEdge(null,null,k||"",c.invert?g:b,c.invert?b:g,l);if(null!=c.labels)for(l=
+0;l<c.labels.length;l++){var m=c.labels[l],p=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=m.placeholders&&(p.value=A.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,p.value,t));if(null!=m.dx||null!=m.dy)p.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(p)}pa.push(k);mxUtils.remove(c.invert?b:g,va)}}});Ca(U,U,Ba);if(null!=k[U.id])for(ja=0;ja<k[U.id].length;ja++)Ca(U,
+k[U.id][ja],Ba)}if(null!=oa)for(Q=0;Q<e.length;Q++)for(U=e[Q],ja=0;ja<oa.length;ja++)A.setAttributeForCell(U,mxUtils.trim(oa[ja]),null);if(0<g.length){var Ea=new mxParallelEdgeLayout(A);Ea.spacing=R;Ea.checkOverlap=!0;var Fa=function(){0<Ea.spacing&&Ea.execute(A.getDefaultParent());for(var b=0;b<g.length;b++){var d=A.getCellGeometry(g[b]);d.x=Math.round(A.snap(d.x));d.y=Math.round(A.snap(d.y));"auto"==M&&(d.width=Math.round(A.snap(d.width)));"auto"==P&&(d.height=Math.round(A.snap(d.height)))}};if("["==
+fa.charAt(0)){var Ja=S;A.view.validate();this.executeLayoutList(JSON.parse(fa),function(){Fa();Ja()});S=null}else if("circle"==fa){var za=new mxCircleLayout(A);za.disableEdgeStyle=!1;za.resetEdges=!1;var Ga=za.isVertexIgnored;za.isVertexIgnored=function(b){return Ga.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){za.execute(A.getDefaultParent());Fa()},!0,S);S=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&pa.length==2*g.length-1&&1==va.length){A.view.validate();
+var Aa=new mxCompactTreeLayout(A,"horizontaltree"==fa);Aa.levelDistance=ba;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(A.getDefaultParent(),0<va.length?va[0]:null)},!0,S);S=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==va.length){A.view.validate();var W=new mxHierarchicalLayout(A,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);W.intraCellSpacing=ba;W.parallelEdgeSpacing=R;W.interRankCellSpacing=F;W.disableEdgeStyle=
+!1;this.executeLayout(function(){W.execute(A.getDefaultParent(),pa);A.moveCells(pa,X,ca)},!0,S);S=null}else if("organic"==fa||"auto"==fa&&pa.length>g.length){A.view.validate();var ya=new mxFastOrganicLayout(A);ya.forceConstant=3*ba;ya.disableEdgeStyle=!1;ya.resetEdges=!1;var Na=ya.isVertexIgnored;ya.isVertexIgnored=function(b){return Na.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){ya.execute(A.getDefaultParent());Fa()},!0,S);S=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=
+S&&S()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);
+this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);
+this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};
+EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,
+c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&
+!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
+c&&!c.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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");
+c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,n)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),p=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&
+m*p<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+p+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==
+e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,n,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=
+this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();for(b=0;b<n.length;b++){var t=n[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));
c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,
@@ -3720,46 +3725,46 @@ arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteI
d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",
{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var d=document.createElement("iframe");d.style.display=
"none";d.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(d);var c=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,
-function(c){null==c||".scratchpad"==b&&c==this.emptyLibraryXml?d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(A){console.log(A)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(A){console.log(A)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g=
+function(c){null==c||".scratchpad"==b&&c==this.emptyLibraryXml?d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g=
{};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(d.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(c?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],c=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=
-function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(m){null!=c&&c(m)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=
+function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(p){null!=c&&c(p)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=
function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=
function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();
-f.onsuccess=function(){b(f.result)};f.onerror=c}catch(p){null!=c&&c(p)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();
+f.onsuccess=function(){b(f.result)};f.onerror=c}catch(q){null!=c&&c(q)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();
null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,
b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,n,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,n,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,n,t,v,y,x,F,D,E,K,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,v,
-y,x,F,D,E,K,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};
+return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,n,t,v,y,x,D,C,E,K,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,v,
+y,x,D,C,E,K,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};
EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,
c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k="<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=
function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=D.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==D&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(p.click(),mxEvent.consume(b)):27==b.keyCode&&(n.click(),mxEvent.consume(b)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function q(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function m(b){b.style.border="";b.removeChild(b.busyImg)}function p(c,e,g,k,n){function A(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});F.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=Q;b(c);return{pdiv:e,replies:d}}function x(e,f,g,n,t){function u(){l(D);c.addReply(x,function(b){x.id=b;c.replies.push(x);m(D);g&&g()},function(c){v();q(D);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function v(){d(x,D,function(b){u()},!0)}var A=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=p(x,c.replies,A,k+1);f?v():u()}if(n||!c.isResolved){E.style.display="none";var Q=document.createElement("div");Q.className="geCommentContainer";Q.setAttribute("data-commentId",c.id);Q.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(Q.style.backgroundColor="ghostWhite");
-var I=document.createElement("div");I.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;I.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";I.appendChild(T);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,c.user.displayName||"");T.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",c.id);f(c,
-K);T.appendChild(K);Q.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,c.content||"");Q.appendChild(I);c.isLocked&&(Q.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";I.appendChild(F);u||c.isLocked||0!=k&&!v||A(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(A(mxResources.get("edit"),
-function(){function e(){d(c,Q,function(){l(Q);c.editComment(c.content,function(){m(Q)},function(c){q(Q);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),A(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(Q);c.deleteComment(function(b){if(!0===b){b=Q.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=Q.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);m(Q);Q.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)D.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==D.getElementsByTagName("div").length?"block":"none"}},function(c){q(Q);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||A(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=N(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?x(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});Q.appendChild(I);null!=g?D.insertBefore(Q,g.nextSibling):D.appendChild(Q);for(g=0;null!=c.replies&&g<c.replies.length;g++)I=c.replies[g],I.isResolved=c.isResolved,p(I,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,Q,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return Q}}
-var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var F=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.bottom=parseInt(F)+7+"px";x.appendChild(D);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(E,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=F;K.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";K.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";F=document.createElement("a");F.className="geButton";if(!u){var L=F.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;J.push(c);m(g)},function(c){q(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=p(f,J,null,0);e();c.preventDefault();mxEvent.consume(c)});K.appendChild(L)}L=F.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";A();b.preventDefault();mxEvent.consume(b)});K.appendChild(L);b.commentsRefreshNeeded()&&(L=F.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){A();
-b.preventDefault();mxEvent.consume(b)}),K.appendChild(L));b.commentsSaveNeeded()&&(F=F.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',F.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),K.appendChild(F));x.appendChild(K);var J=[],A=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
-var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});D.innerHTML="";D.appendChild(E);E.style.display="block";J=b;for(b=0;b<J.length;b++)c(J[b].replies),p(J[b],J,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});A();this.refreshComments=A;K=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=D.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<J.length;e++)b(J[e])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function p(b){b.style.border="";b.removeChild(b.busyImg)}function q(c,e,g,k,n){function B(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});D.appendChild(f);e&&(f.style.display="none")}function x(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=R;b(c);return{pdiv:e,replies:d}}function N(e,f,g,n,t){function v(){l(N);c.addReply(C,function(b){C.id=b;c.replies.push(C);p(N);g&&g()},function(c){u();m(N);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function u(){d(C,N,function(b){v()},!0)}var B=x().pdiv,C=b.newComment(e,b.getCurrentUser());C.pCommentId=c.id;null==c.replies&&(c.replies=[]);var N=q(C,c.replies,B,k+1);f?u():v()}if(n||!c.isResolved){E.style.display="none";var R=document.createElement("div");R.className="geCommentContainer";R.setAttribute("data-commentId",c.id);R.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(R.style.backgroundColor="ghostWhite");
+var G=document.createElement("div");G.className="geCommentHeader";var V=document.createElement("img");V.className="geCommentUserImg";V.src=c.user.pictureUrl||Editor.userImage;G.appendChild(V);V=document.createElement("div");V.className="geCommentHeaderTxt";G.appendChild(V);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,c.user.displayName||"");V.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",c.id);f(c,
+K);V.appendChild(K);R.appendChild(G);G=document.createElement("div");G.className="geCommentTxt";mxUtils.write(G,c.content||"");R.appendChild(G);c.isLocked&&(R.style.opacity="0.5");G=document.createElement("div");G.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";G.appendChild(D);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){N("",!0)},c.isResolved);V=b.getCurrentUser();null==V||V.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
+function(){function e(){d(c,R,function(){l(R);c.editComment(c.content,function(){p(R)},function(c){m(R);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(R);c.deleteComment(function(b){if(!0===b){b=R.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=R.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(R);R.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(R);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=x(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?N(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});R.appendChild(G);null!=g?C.insertBefore(R,g.nextSibling):C.appendChild(R);for(g=0;null!=c.replies&&g<c.replies.length;g++)G=c.replies[g],G.isResolved=c.isResolved,q(G,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,R,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return R}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(D)+7+"px";x.appendChild(C);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(E,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=D;K.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";K.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className="geButton";if(!u){var L=D.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;J.push(c);p(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=q(f,J,null,0);e();c.preventDefault();mxEvent.consume(c)});K.appendChild(L)}L=D.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});K.appendChild(L);b.commentsRefreshNeeded()&&(L=D.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){B();
+b.preventDefault();mxEvent.consume(b)}),K.appendChild(L));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),K.appendChild(D));x.appendChild(K);var J=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(E);E.style.display="block";J=b;for(b=0;b<J.length;b++)c(J[b].replies),q(J[b],J,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;K=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<J.length;e++)b(J[e])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
new mxWindow(mxResources.get("comments"),x,c,e,k,g,!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(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
-k,g,n,t,d,f,l,q){var m=document.createElement("div");m.style.textAlign="center";q=null!=q?q:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=q+"px";p.style.lineHeight="1.2em";mxUtils.write(p,c);m.appendChild(p);null!=l&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),p.appendChild(c),m.appendChild(p));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+k,g,n,t,d,f,l,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=m+"px";q.style.lineHeight="1.2em";mxUtils.write(q,c);p.appendChild(q);null!=l&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),q.appendChild(c),p.appendChild(q));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(u.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&l.appendChild(n);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(u.checked)});l.appendChild(v);null!=t?(v.innerHTML=
-t+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);m.appendChild(l);f?(l.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,
-"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.focus()};this.container=m};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):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")};
+t+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);p.appendChild(l);f?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.focus()};this.container=p};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):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,c,e){this.ui=b;this.page=c;this.previous=this.name=e}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,c,e){this.ui=b;this.oldIndex=c;this.newIndex=e}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,c,e){this.ui=b;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=e&&(c.viewState=e,this.neverShown=!1))}
@@ -3802,7 +3807,7 @@ EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.
b)+1);k.updateCustomLinks(k.createCellMapping(n,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
EditorUi.prototype.movePage=function(b,c){this.editor.graph.model.execute(new MovePage(this,b,c))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display="inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
-1),g=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+1),g=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(n,this.createTabForPage(this.pages[n],k,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(c.clientWidth>this.tabContainer.clientWidth-e){null!=k&&(k.style.position="absolute",k.style.right="0px",c.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
@@ -3821,7 +3826,7 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!k){var t=new mxPopupMenu(th
EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=c&&(g+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+k.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var g=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,q){c=this.createUrlParameters(c,e,d,f,k,q);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,m){c=this.createUrlParameters(c,e,d,f,k,m);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),k))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.previous;k.previous=k.name;k.name=b;return k};mxCodecRegistry.register(b)})();
@@ -3833,38 +3838,38 @@ c,e,t,d,f),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.pro
!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function d(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=v.cloneCells([f[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(f[0],
!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=v.view.getState(b),n=v.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var q=v.getOutgoingTreeEdges(v.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=f=0;u<q.length;u++){var A=v.model.getTerminal(q[u],!1);if(k==d(A)){var x=v.view.getState(A);A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}t?l=0:f=0;for(u=0;u<q.length;u++)if(A=v.model.getTerminal(q[u],!1),k==d(A)&&(x=v.view.getState(A),A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});v.moveCells(D,(c?1:-1)*f,(c?1:-1)*l)}}}return v.addCells(g,e)}finally{v.model.endUpdate()}}function l(b){v.model.beginUpdate();try{var c=
+b.geometry.height+10:-g[1].geometry.height-10)*n;var q=v.getOutgoingTreeEdges(v.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=f=0;u<q.length;u++){var B=v.model.getTerminal(q[u],!1);if(k==d(B)){var x=v.view.getState(B);B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
+p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}t?l=0:f=0;for(u=0;u<q.length;u++)if(B=v.model.getTerminal(q[u],!1),k==d(B)&&(x=v.view.getState(B),B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var C=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&C.push(c);(null==c||d)&&C.push(b);return null==c||d});v.moveCells(C,(c?1:-1)*f,(c?1:-1)*l)}}}return v.addCells(g,e)}finally{v.model.endUpdate()}}function l(b){v.model.beginUpdate();try{var c=
d(b),e=v.getIncomingTreeEdges(b),f=v.cloneCells([e[0],b]);v.model.setTerminal(e[0],f[1],!1);v.model.setTerminal(f[0],f[1],!0);v.model.setTerminal(f[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);v.moveCells(l,m,n);return v.addCells(f,g)}finally{v.model.endUpdate()}}function q(b,c){v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[v.createEdge(e,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([f[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)v.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(Y){}}var f=v.getOutgoingTreeEdges(b),p=e.geometry,l=[];v.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var q=v.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,A=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/A-u.y+-p.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function m(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
-d.y-d.height})}return e}function p(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?u.actions.get("selectParent").funct():e==c?(f=v.getOutgoingTreeEdges(b),null!=f&&0<f.length&&v.setSelectionCell(v.model.getTerminal(f[0],!1))):(e=v.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=m(v.model.getTerminal(e[0],!0),f,b),e=v.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
+(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);v.moveCells(l,m,n);return v.addCells(f,g)}finally{v.model.endUpdate()}}function m(b,c){v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[v.createEdge(e,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([f[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),n;for(n in m)v.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(oa){}}var f=v.getOutgoingTreeEdges(b),p=e.geometry,l=[];v.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var q=v.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,B=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/B-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/B-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/B-u.y+-p.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function p(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+d.y-d.height})}return e}function q(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?u.actions.get("selectParent").funct():e==c?(f=v.getOutgoingTreeEdges(b),null!=f&&0<f.length&&v.setSelectionCell(v.model.getTerminal(f[0],!1))):(e=v.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=p(v.model.getTerminal(e[0],!0),f,b),e=v.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&v.setSelectionCell(f[e].cell)))))}var u=this,v=u.editor.graph,y=v.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var F=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return F.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var D=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=D.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+var D=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return D.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var E=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var A=v.view.getState(n);null!=A&&(d=(A.getCenterX()-u.getCenterX())/v.view.scale,e=(A.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var B=v.view.getState(n);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
!0))&&this.model.setTerminal(m[q],n,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){p=n;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var K=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=K.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
-!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):q(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
-v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(p(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(p(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(p(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(p(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(G){u.handleError(G)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var J=v.connectVertex;v.connectVertex=function(c,e,g,k,m,n,p){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),A=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?q(c,e):A==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return J.apply(this,arguments)};v.getSubtree=function(d){var e=
-[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):m(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(F){u.handleError(F)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var J=v.connectVertex;v.connectVertex=function(c,e,g,k,n,p,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return J.apply(this,arguments)};v.getSubtree=function(d){var e=
+[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(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(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){P.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){V.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.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 e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=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};');c.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 e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);var m=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};');
-m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);m.insertEdge(p,!1);var u=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};');
-u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(k);b.insert(p);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(m);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);var p=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};');
+p.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;c.insertEdge(q,!0);p.insertEdge(q,!1);var u=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};');
+u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(k);b.insert(q);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(p);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=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;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'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;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'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};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3881,98 +3886,110 @@ e.className="geTitle";e.innerHTML='<span style="font-size:18px;margin-right:5px;
e.className="geTitle";var g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));e.appendChild(g);c.appendChild(e);mxEvent.addListener(e,"click",b.actions.get("newLibrary").funct);e=document.createElement("div");e.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;";e.className="geTitle";g=document.createElement("span");
g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("openLibrary"));e.appendChild(g);c.appendChild(e);mxEvent.addListener(e,"click",b.actions.get("openLibrary").funct)}else e=d("newLibrary",mxResources.get("newLibrary")),e.style.boxSizing="border-box",e.style.paddingRight="6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="0",e=d("openLibraryFrom",mxResources.get("openLibraryFrom")),e.style.borderLeft="1px solid lightgray",e.style.boxSizing="border-box",e.style.paddingRight=
"6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="50%";c.appendChild(b.sidebar.container);c.style.overflow="hidden";return c});b.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);b.sidebarWindow.window.setVisible(!0);b.getLocalData("sidebar",function(c){b.sidebar.showEntries(c,null,!0)});b.restoreLibraries()}else b.sidebarWindow.window.setVisible(null!=c?c:!b.sidebarWindow.window.isVisible());b.sidebarWindow.window.isVisible()&&b.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||
-"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,k=function(b,c,d,e,f,g,k){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";k(l);this.window=new mxWindow(c,l,d,e,
-f,g,!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(b,c){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-("1"==urlParams.sketch?3:48)));
-this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(c){null==c&&(c=window.event);return null!=c&&b.isSelectionAllowed(c)}))};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=
+"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=0;try{e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(C){}var k=function(b,c,d,e,f,g,k){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";k(l);this.window=
+new mxWindow(c,l,d,e,f,g,!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(b,c){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-("1"==urlParams.sketch?
+3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(c){null==c&&(c=window.event);return null!=c&&b.isSelectionAllowed(c)}))};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(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
-function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
-null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&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();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
-StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";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;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};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; }":
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);null==urlParams.dark&&(mxSettings.settings.darkMode=b,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.defaultPageBackgroundColor=
+"1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";c.loadStylesheet();null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&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();Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";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;n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};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 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 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; }html body .geStatus { padding-top:3px !important; }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: '+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
-(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#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()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+(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 n=document.createElement("style");n.type="text/css";n.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(n);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=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");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var f=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):f.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
-b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.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){var b=
-document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
-b.appendChild(c)}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,
-"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top=
-"6px"}};var m=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=m.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var p=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
-function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;p.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
-e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
-function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var v=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);v.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;
-EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"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 x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible="1"!=urlParams.sketch;
-d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){d.setSketchMode(!Editor.sketchMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=d.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(b){d.setPagesVisible(!Editor.pagesVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.pagesVisible});d.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){e.popupMenuHandler.hideMenu();d.showImportCsvDialog()}));d.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("formatSql",
-new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(d,"Insert from Text","formatSql");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){c(d)},null,null,Editor.ctrlKey+"+Shift+K"));d.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(d)})).shortcut=d.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!d.isOffline()&&
-d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(b.container,620,420,!0,!1);b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=
-this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();d.menus.addSubmenu("extras",b,c,mxResources.get("preferences"));b.addSeparator(c);
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&d.menus.addMenuItems(b,["-","save"],c),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&d.menus.addMenuItems(b,["saveAndExit"],c),b.addSeparator(c)):(d.menus.addMenuItems(b,["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),
-null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));d.menus.addSubmenu("exportAs",b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,
-["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,["print"],c);null!=e&&null!=d.fileNode&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?d.menus.addMenuItems(b,["-","exit"],c):d.menus.addMenuItems(b,
-["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==
-e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);b.addSeparator(c);d.menus.addSubmenu("embed",b,c)})));var l=this.get("language");this.put("table",
-new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,
-function(b,c){"1"!=urlParams.embed&&d.menus.addSubmenu("theme",b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],c);this.addMenuItems(b,["toggleDarkMode"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c);
-"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],c);b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),
-c=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,
-e,f);d.showDialog(b.container,620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.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%;";
-c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var F=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display=
-"inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+
-mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle=
-"none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",
-function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign=
-"top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);
-return d}function k(){for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));"1"==urlParams.sketch?ba.style.left=58>I.offsetTop-I.offsetHeight/2?"70px":"10px":(c=b?d("diagram",null,Editor.drawLogoImage):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:null)],b?60:null),c=d("insert",!0,b?B:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=e&&(g([ta,S],60),520<=e&&g([ra,
-640<=e?f("",ca.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ca,Editor.zoomInImage):null,640<=e?f("",R.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",R,Editor.zoomOutImage):null],60)));null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=
-c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==oa&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",
-c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),oa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=oa&&(oa.parentNode.removeChild(oa),oa=null))}F.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom=
-"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==
-urlParams.sketch||1E3<=e)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.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(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();
-n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=
-b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";var C=n.menus.get("viewZoom"),B="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,U="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,ba="1"==urlParams.sketch?document.createElement("div"):null,V=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
-(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",V);n.addListener("sketchModeChanged",V);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var qa=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||
-qa.apply(this,arguments)}}if(null!=p.freehand){var ma=p.freehand.createStyle;p.freehand.createStyle=function(b){return ma.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){I.className="geToolbarContainer";U.className="geToolbarContainer";ba.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=I;var ja=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ja||(n.statusContainer.style.display=
-"none")});var na=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=
-null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();na(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ja=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ja=!1)}else n.statusContainer.style.display=
-"inline-block",na(null),ja=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));O=d("diagram",null,Editor.menuImage);O.style.boxShadow="none";O.style.padding="6px";O.style.margin="0px";ba.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display=
-"none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";
-Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var ka=!1,la=mxUtils.bind(this,function(){I.innerHTML="";if(!ka){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
-null!=d?d:"default";b.style.margin="2px 0px";I.appendChild(b);mxUtils.br(I);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.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,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
-")",B);O=d("table",null,Editor.tableImage);O.style.boxShadow="none";O.style.opacity="0.7";O.style.padding="6px";O.style.margin="0px";O.style.width="37px";c(O,null,"pointer");b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}I.appendChild(Y)});mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){ka?(mxUtils.setPrefixedStyle(I.style,"transform","translate(0, -50%)"),I.style.padding="8px 6px 4px",I.style.top="50%",I.style.bottom="",I.style.height="",Y.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",Y.style.width="40px",Y.style.height="12px",Y.setAttribute("title","Minimize"),ka=!1,la()):(I.innerHTML="",I.appendChild(Y),mxUtils.setPrefixedStyle(I.style,"transform","translate(0, 0)"),I.style.top="",I.style.bottom="12px",I.style.padding="0px",I.style.height="24px",Y.style.height="24px",Y.style.backgroundImage="url("+Editor.plusImage+")",Y.setAttribute("title",mxResources.get("insert")),Y.style.width="24px",ka=!0)}));la();n.addListener("darkModeChanged",
-la);n.addListener("sketchModeChanged",la)}else n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=C){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},ca=n.actions.get("zoomIn"),R=n.actions.get("zoomOut"),Z=n.actions.get("resetView"),W=n.actions.get("fullscreen");n.actions.get("toggleDarkMode");var da=n.actions.get("undo"),ia=n.actions.get("redo"),
-ta=f("",da.funct,null,mxResources.get("undo")+" ("+da.shortcut+")",da,Editor.undoImage),S=f("",ia.funct,null,mxResources.get("redo")+" ("+ia.shortcut+")",ia,Editor.redoImage);if(null!=U){var C=function(){aa.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length||Editor.pagesVisible?"inline-block":"none"},ea=n.actions.get("delete"),ha=f("",ea.funct,null,mxResources.get("delete"),ea,Editor.trashImage);ha.style.opacity="0.1";ba.appendChild(ha);ea.addListener("stateChanged",function(){ha.style.opacity=
-ea.enabled?"":"0.1"});Z=function(){ta.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";S.style.display=ta.style.display;ta.style.opacity=da.enabled?"":"0.1";S.style.opacity=ia.enabled?"":"0.1"};ba.appendChild(ta);ba.appendChild(S);da.addListener("stateChanged",Z);ia.addListener("stateChanged",Z);Z();null!=urlParams.layers&&(Z=n.actions.get("layers"),Z=f("",Z.funct,null,mxResources.get("layers"),Z,Editor.layersImage),Z.style.opacity="0.4",U.appendChild(Z));null!=
-urlParams.tags&&(Z=n.actions.get("tags"),Z=f("",Z.funct,null,mxResources.get("tags"),Z,Editor.tagsImage),Z.style.opacity="0.4",U.appendChild(Z));Z=n.actions.get("outline");Z=f("",Z.funct,null,mxResources.get("outline"),Z,Editor.outlineImage);U.appendChild(Z);Z=f("",R.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",R,Editor.zoomOutImage);U.appendChild(Z);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
-" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";U.appendChild(O);mxEvent.addListener(O,"click",V);V=f("",ca.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ca,Editor.zoomInImage);U.appendChild(V);var aa=this.createPageMenuTab(!1);
-aa.style.display="none";aa.style.position="";aa.style.marginLeft="";aa.style.top="";aa.style.left="";aa.style.height="100%";aa.style.lineHeight="";aa.style.borderStyle="none";aa.style.padding="3px 0";aa.style.margin="0px";aa.style.background="";aa.style.border="";aa.style.boxShadow="none";aa.style.verticalAlign="top";aa.firstChild.style.height="100%";aa.firstChild.style.opacity="0.6";aa.firstChild.style.margin="0px";U.appendChild(aa);n.addListener("fileDescriptorChanged",C);n.addListener("pagesVisibleChanged",
-C);C();n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;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;";ba.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;";
-U.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(ba);y.appendChild(U);I.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;";y.appendChild(I);window.setTimeout(function(){mxUtils.setPrefixedStyle(I.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else{f("",W.funct,null,mxResources.get("fullscreen"),W,Editor.fullscreenImage);var ra=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Z,Editor.zoomFitImage);q.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";O=u.addMenu("100%",C.funct);O.setAttribute("title",mxResources.get("zoom")+
-" (Alt+Mousewheel)");O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.textDecoration="none";O.style.overflow="hidden";O.style.visibility="hidden";O.style.textAlign="center";O.style.cursor="pointer";O.style.height=parseInt(n.tabContainerHeight)-1+"px";O.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";O.style.position="absolute";O.style.display="block";O.style.fontSize="12px";O.style.width="59px";O.style.right="0px";O.style.bottom="0px";O.style.backgroundImage=
-"url("+mxWindow.prototype.minimizeImage+")";O.style.backgroundPosition="right 6px center";O.style.backgroundRepeat="no-repeat";y.appendChild(O)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(O);var ua=n.setGraphEnabled;n.setGraphEnabled=function(){ua.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==U?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==U&&y.appendChild(n.tabContainer);var oa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();
-null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\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\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. Do you want to synchronize those changes?\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\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\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\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\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\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\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\npickGDriveFile=Pick 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\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="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><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="#000000"/><add as="fontColor" value="#000000"/></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="#ffffff"/><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="#ffffff"/><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="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><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="#ffffff"/></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;
+b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.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 b=document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className=
+"geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var p=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=p.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
+e.x+=d.x-16;e.y+=d.y;return e};var q=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;q.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-",
+"lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||
+mxClient.IS_IE11)||this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
+var v=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);v.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"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 x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";
+d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible="1"!=urlParams.sketch;d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){d.setSketchMode(!Editor.sketchMode)}));
+f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=d.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(b){d.setPagesVisible(!Editor.pagesVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.pagesVisible});d.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){e.popupMenuHandler.hideMenu();d.showImportCsvDialog()}));d.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
+new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(d,"Insert from Text","formatSql");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){c(d)},null,null,Editor.ctrlKey+"+Shift+K"));d.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(d)})).shortcut=d.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(b.container,620,420,!0,!1);
+b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,
+c){var e=d.getCurrentFile();d.menus.addSubmenu("extras",b,c,mxResources.get("preferences"));b.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(b,["-","save"],c),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&d.menus.addMenuItems(b,["saveAndExit"],c),b.addSeparator(c)):(d.menus.addMenuItems(b,
+["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));d.menus.addSubmenu("exportAs",b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):
+d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,["print"],c);null!=e&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||
+this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&d.menus.addMenuItems(b,["-","exit"],c):d.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&
+"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,
+c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);b.addSeparator(c);d.menus.addSubmenu("embed",b,c)})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,
+function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&d.menus.addSubmenu("theme",b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"!=urlParams.embedInline&&("1"==urlParams.sketch&&
+this.addMenuItems(b,["toggleSketchMode"],c),this.addMenuItems(b,["toggleDarkMode"],c),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c),"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],c));b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",
+new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),c=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-",
+"toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=
+this.editor.graph,d=document.createElement("div");d.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%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var D=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,
+f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat=
+"no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled",
+"disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding=
+"10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(X.style.left=58>G.offsetTop-G.offsetHeight/2?"70px":"10px");else{for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);
+b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));c=b?d("diagram",null,Editor.drawLogoImage):null;null!=c&&(k=c);g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+
+")",n.actions.get("image"),b?Editor.formatImage:null)],b?60:null);c=d("insert",!0,b?A:null);g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null);411<=e&&(g([U,ea],60),520<=e&&g([xa,640<=e?f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",T,Editor.zoomInImage):null,640<=e?f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60))}null!=
+k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==sa&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage=
+"url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),sa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=sa&&(sa.parentNode.removeChild(sa),sa=null))}D.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 l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);
+"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=e)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);
+var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.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(b){mxEvent.getSource(b)==
+this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop=
+"7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");
+c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className=
+"geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var I=n.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,S="1"==urlParams.sketch?
+document.createElement("div"):null,G="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null,ca=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",
+ca);n.addListener("sketchModeChanged",ca);var ma=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)X.style.left="10px",X.style.top="10px",G.style.left="10px",G.style.top="60px",S.style.top="10px",S.style.right="12px",S.style.left="",n.diagramContainer.setAttribute("data-bounds",n.diagramContainer.style.top+" "+n.diagramContainer.style.left+" "+n.diagramContainer.style.width+" "+n.diagramContainer.style.height),n.diagramContainer.style.top="0px",n.diagramContainer.style.left="0px",n.diagramContainer.style.bottom=
+"0px",n.diagramContainer.style.right="0px",n.diagramContainer.style.width="",n.diagramContainer.style.height="";else{var b=n.diagramContainer.getAttribute("data-bounds");if(null!=b){n.diagramContainer.style.background="transparent";n.diagramContainer.removeAttribute("data-bounds");var c=p.getGraphBounds(),b=b.split(" ");n.diagramContainer.style.top=b[0];n.diagramContainer.style.left=b[1];n.diagramContainer.style.width=c.width+50+"px";n.diagramContainer.style.height=c.height+46+"px";n.diagramContainer.style.bottom=
+"";n.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:n.diagramContainer.getBoundingClientRect()}),"*");n.refresh()}X.style.left=n.diagramContainer.offsetLeft+"px";X.style.top=n.diagramContainer.offsetTop-X.offsetHeight-4+"px";G.style.display="";G.style.left=n.diagramContainer.offsetLeft-G.offsetWidth-4+"px";G.style.top=n.diagramContainer.offsetTop+"px";S.style.left=n.diagramContainer.offsetLeft+n.diagramContainer.offsetWidth-S.offsetWidth+
+"px";S.style.top=X.style.top;S.style.right="";n.bottomResizer.style.left=n.diagramContainer.offsetLeft+(n.diagramContainer.offsetWidth-n.bottomResizer.offsetWidth)/2+"px";n.bottomResizer.style.top=n.diagramContainer.offsetTop+n.diagramContainer.offsetHeight-n.bottomResizer.offsetHeight/2-1+"px";n.rightResizer.style.left=n.diagramContainer.offsetLeft+n.diagramContainer.offsetWidth-n.rightResizer.offsetWidth/2-1+"px";n.rightResizer.style.top=n.diagramContainer.offsetTop+(n.diagramContainer.offsetHeight-
+n.bottomResizer.offsetHeight)/2+"px"}n.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";n.rightResizer.style.visibility=n.bottomResizer.style.visibility;q.style.display="none";X.style.visibility="";S.style.visibility=""}),ca=mxUtils.bind(this,function(){this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ma()});n.addListener("inlineFullscreenChanged",ca);n.addListener("editInlineStart",ca);"1"==urlParams.embedInline&&
+n.addListener("darkModeChanged",ca);n.addListener("editInlineStop",mxUtils.bind(this,function(b){n.diagramContainer.style.width="10px";n.diagramContainer.style.height="10px";n.diagramContainer.style.border="";n.bottomResizer.style.visibility="hidden";n.rightResizer.style.visibility="hidden";X.style.visibility="hidden";S.style.visibility="hidden";G.style.display="none"}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&
+!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var fa=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||fa.apply(this,arguments)}}if(null!=p.freehand){var na=p.freehand.createStyle;p.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){G.className="geToolbarContainer";S.className="geToolbarContainer";X.className="geToolbarContainer";
+q.className="geToolbarContainer";n.picker=G;var ka=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ka||(n.statusContainer.style.display="none")});var oa=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed?(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();oa(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?
+(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ka=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ka=!1)}else n.statusContainer.style.display="inline-block",oa(null),ka=!0;q.style.visibility=12<q.clientWidth?"":"hidden"}))):n.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.style.visibility=16<q.clientWidth?"":"hidden"}));O=d("diagram",
+null,Editor.menuImage);O.style.boxShadow="none";O.style.padding="6px";O.style.margin="0px";X.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding=
+"6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var la=!1,aa=mxUtils.bind(this,function(){G.innerHTML="";if(!la){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";G.appendChild(b);mxUtils.br(G);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.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,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);
+b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],
+b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+")",A);O=d("table",null,Editor.tableImage);O.style.boxShadow="none";O.style.opacity="0.7";O.style.padding="6px";O.style.margin=
+"0px";O.style.width="37px";c(O,null,"pointer");b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}"1"!=urlParams.embedInline&&G.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){la?(mxUtils.setPrefixedStyle(G.style,"transform","translate(0, -50%)"),G.style.padding="8px 6px 4px",G.style.top="50%",G.style.bottom="",G.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",
+Z.setAttribute("title","Minimize"),la=!1,aa()):(G.innerHTML="",G.appendChild(Z),mxUtils.setPrefixedStyle(G.style,"transform","translate(0, 0)"),G.style.top="",G.style.bottom="12px",G.style.padding="0px",G.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",la=!0)}));aa();n.addListener("darkModeChanged",aa);n.addListener("sketchModeChanged",aa)}else n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=I){var ca=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},T=n.actions.get("zoomIn"),ra=n.actions.get("zoomOut"),Q=n.actions.get("resetView"),da=n.actions.get("fullscreen");n.actions.get("toggleDarkMode");var ia=n.actions.get("undo"),wa=n.actions.get("redo"),U=f("",ia.funct,null,mxResources.get("undo")+" ("+ia.shortcut+")",ia,Editor.undoImage),
+ea=f("",wa.funct,null,mxResources.get("redo")+" ("+wa.shortcut+")",wa,Editor.redoImage),da=f("",da.funct,null,mxResources.get("fullscreen"),da,Editor.fullscreenImage);if(null!=S){I=function(){Y.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length||Editor.pagesVisible?"inline-block":"none"};da.parentNode.removeChild(da);var ha=n.actions.get("delete"),ja=f("",ha.funct,null,mxResources.get("delete"),ha,Editor.trashImage);ja.style.opacity="0.1";X.appendChild(ja);ha.addListener("stateChanged",
+function(){ja.style.opacity=ha.enabled?"":"0.1"});Q=function(){U.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ea.style.display=U.style.display;U.style.opacity=ia.enabled?"":"0.1";ea.style.opacity=wa.enabled?"":"0.1"};X.appendChild(U);X.appendChild(ea);ia.addListener("stateChanged",Q);wa.addListener("stateChanged",Q);Q();null!=urlParams.layers&&(Q=n.actions.get("layers"),Q=f("",Q.funct,null,mxResources.get("layers"),Q,Editor.layersImage),Q.style.opacity=
+"0.4",S.appendChild(Q));null!=urlParams.tags&&(Q=n.actions.get("tags"),Q=f("",Q.funct,null,mxResources.get("tags"),Q,Editor.tagsImage),Q.style.opacity="0.4",S.appendChild(Q));Q=n.actions.get("outline");Q=f("",Q.funct,null,mxResources.get("outline"),Q,Editor.outlineImage);S.appendChild(Q);Q=f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ra,Editor.zoomOutImage);S.appendChild(Q);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+
+"/"+mxResources.get("resetView")+" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";S.appendChild(O);mxEvent.addListener(O,"click",ca);ca=f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",T,Editor.zoomInImage);S.appendChild(ca);
+"1"==urlParams.embedInline&&S.appendChild(da);var Y=this.createPageMenuTab(!1);Y.style.display="none";Y.style.position="";Y.style.marginLeft="";Y.style.top="";Y.style.left="";Y.style.height="100%";Y.style.lineHeight="";Y.style.borderStyle="none";Y.style.padding="3px 0";Y.style.margin="0px";Y.style.background="";Y.style.border="";Y.style.boxShadow="none";Y.style.verticalAlign="top";Y.firstChild.style.height="100%";Y.firstChild.style.opacity="0.6";Y.firstChild.style.margin="0px";S.appendChild(Y);n.addListener("fileDescriptorChanged",
+I);n.addListener("pagesVisibleChanged",I);I();n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;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;";X.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;";
+S.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(X);y.appendChild(S);G.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;";y.appendChild(G);window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else{var xa=f("",ca,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);q.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";O=u.addMenu("100%",I.funct);O.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");O.style.whiteSpace="nowrap";O.style.paddingRight=
+"10px";O.style.textDecoration="none";O.style.textDecoration="none";O.style.overflow="hidden";O.style.visibility="hidden";O.style.textAlign="center";O.style.cursor="pointer";O.style.height=parseInt(n.tabContainerHeight)-1+"px";O.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";O.style.position="absolute";O.style.display="block";O.style.fontSize="12px";O.style.width="59px";O.style.right="0px";O.style.bottom="0px";O.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";O.style.backgroundPosition=
+"right 6px center";O.style.backgroundRepeat="no-repeat";y.appendChild(O)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(O);var ua=n.setGraphEnabled;n.setGraphEnabled=function(){ua.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom=
+"hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==S&&y.appendChild(n.tabContainer);var sa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();
+null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";G.style.transform="";mxEvent.addGestureListeners(n.diagramContainer.parentNode,function(b){mxEvent.getSource(b)==n.diagramContainer.parentNode&&n.sendEmbeddedSvgExport()});l=document.createElement("div");l.style.position="absolute";l.style.width=
+"10px";l.style.height="10px";l.style.borderRadius="5px";l.style.border="1px solid gray";l.style.background="#ffffff";l.style.cursor="row-resize";n.diagramContainer.parentNode.appendChild(l);n.bottomResizer=l;var va=null,pa=null,Ba=null,Ca=null;mxEvent.addGestureListeners(l,function(b){Ca=parseInt(n.diagramContainer.style.height);pa=mxEvent.getClientY(b);p.popupMenuHandler.hideMenu();mxEvent.consume(b)});l=l.cloneNode(!1);l.style.cursor="col-resize";n.diagramContainer.parentNode.appendChild(l);n.rightResizer=
+l;mxEvent.addGestureListeners(l,function(b){Ba=parseInt(n.diagramContainer.style.width);va=mxEvent.getClientX(b);p.popupMenuHandler.hideMenu();mxEvent.consume(b)});mxEvent.addGestureListeners(document.body,null,function(b){var c=!1;null!=va&&(n.diagramContainer.style.width=Math.max(20,Ba+mxEvent.getClientX(b)-va)+"px",c=!0);null!=pa&&(n.diagramContainer.style.height=Math.max(20,Ca+mxEvent.getClientY(b)-pa)+"px",c=!0);c&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,
+rect:n.diagramContainer.getBoundingClientRect()}),"*"),n.fireEvent(new mxEventObject("editInlineStart")),n.refresh())},function(b){null==va&&null==pa||mxEvent.consume(b);pa=va=null});p.defaultPageBackgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";n.bottomResizer.style.visibility="hidden";n.rightResizer.style.visibility="hidden";X.style.visibility="hidden";S.style.visibility="hidden";G.style.display="none"}"1"==urlParams.prefetchFonts&&
+n.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\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\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. Do you want to synchronize those changes?\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\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\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\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\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\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\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\npickGDriveFile=Pick 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\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="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><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="#000000"/><add as="fontColor" value="#000000"/></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="#ffffff"/><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="#ffffff"/><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="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><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="#ffffff"/></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=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="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><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="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></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="#2a2a2a"/><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="#2a2a2a"/><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="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><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="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};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;
GraphViewer.prototype.init=function(b,c,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
@@ -3982,9 +3999,9 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+
" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};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 k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var m=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
-this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=m&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),m=this.xmlNode)}),n=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
-b.originalSrc=c))}n.apply(this,arguments)};var u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};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),
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var n=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=n&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),n=this.xmlNode)}),q=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
+b.originalSrc=c))}q.apply(this,arguments)};var u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};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(b){return!mxEvent.isPopupTrigger(b.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(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var v=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return v.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
@@ -4005,27 +4022,27 @@ this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWi
k);var t=mxUtils.bind(this,function(d){var e=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var k=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||c.width+2*this.graph.border>b.offsetWidth||c.height+2*this.graph.border>k)?(d=null,null!=k&&c.height+2*this.graph.border>k-2&&(d=(k-2*this.graph.border-2)/c.height),this.fitGraph(d)):this.widthIsEmpty||
null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),g=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();g=null;t(b)}};
GraphViewer.prototype.crop=function(){var b=this.graph,c=b.getGraphBounds(),e=b.border,k=b.view.scale;b.view.setTranslate(null!=c.x?Math.floor(b.view.translate.x-c.x/k+e):e,null!=c.y?Math.floor(b.view.translate.y-c.y/k+e):e)};GraphViewer.prototype.updateContainerWidth=function(b,c){b.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(b,c){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,n=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var q=n.getCell(k[l]);null!=q&&(t=!0,f[q.id]=!0)}else for(l=0;l<e.length;l++)q=n.getChildAt(n.root,parseInt(e[l])),null!=q&&(t=!0,f[q.id]=!0);for(l=
-0;t&&l<d;l++)q=n.getChildAt(n.root,l),n.setVisible(q,f[q.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,n=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var m=n.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=n.getChildAt(n.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
+0;t&&l<d;l++)m=n.getChildAt(n.root,l),n.setVisible(m,f[m.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
GraphViewer.prototype.addToolbar=function(){function b(b,c,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",b);null!=d&&g.setAttribute("title",d);g.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",c);b.style.width="18px";null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);q++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);m++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,n=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,q=0,m=null,p=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
-v.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(v,70);var F=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(v);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");D.style.paddingLeft="0px";D.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";F.style.display=v.style.display;D.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)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"==x){if(this.layersEnabled){var E=this.graph.getModel(),K=b(mxUtils.bind(this,function(b){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
-(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});b=K.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily=Editor.defaultHtmlFont;m.style.fontSize=
-"11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var c=mxUtils.getDocumentScrollOrigin(document);m.style.left=c.x+b.left-1+"px";m.style.top=c.y+b.bottom-2+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
-function(b){null==p&&(p=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),p.div.getElementsByTagName("div")[0].style.position="",p.div.style.maxHeight="160px",p.div.style.maxWidth="120px",p.div.style.padding="2px",p.div.style.overflow="auto",p.div.style.height="auto",p.div.style.position="fixed",p.div.style.fontFamily=Editor.defaultHtmlFont,p.div.style.fontSize="11px",p.div.style.backgroundColor="#eee",p.div.style.color="#000",p.div.style.border="1px solid #d0d0d0",p.div.style.zIndex=
-this.toolbarZIndex+1,mxUtils.setOpacity(p.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=p.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);p.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
+this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,m=0,p=null,q=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
+v.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(v,70);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)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"==x){if(this.layersEnabled){var E=this.graph.getModel(),K=b(mxUtils.bind(this,function(b){if(null!=p)p.parentNode.removeChild(p),
+p=null;else{p=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});b=K.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily=Editor.defaultHtmlFont;p.style.fontSize=
+"11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var c=mxUtils.getDocumentScrollOrigin(document);p.style.left=c.x+b.left-1+"px";p.style.top=c.y+b.bottom-2+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+function(b){null==q&&(q=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),q.div.getElementsByTagName("div")[0].style.position="",q.div.style.maxHeight="160px",q.div.style.maxWidth="120px",q.div.style.padding="2px",q.div.style.overflow="auto",q.div.style.height="auto",q.div.style.position="fixed",q.div.style.fontFamily=Editor.defaultHtmlFont,q.div.style.fontSize="11px",q.div.style.backgroundColor="#eee",q.div.style.color="#000",q.div.style.border="1px solid #d0d0d0",q.div.style.zIndex=
+this.toolbarZIndex+1,mxUtils.setOpacity(q.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=q.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);q.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&
-(this.graph.minimumContainerSize.width=34*q);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*q;var H=c.style.border,J=mxUtils.bind(this,function(){e.style.width=
+(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,J=mxUtils.bind(this,function(){e.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?
-e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=m&&(m.parentNode.removeChild(m),m=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==m)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",J):J();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&J()})).observe(c)};
+e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=p&&(p.parentNode.removeChild(p),p=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
+c||b==e||b==p)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",J):J();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&J()})).observe(c)};
GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
@@ -4047,8 +4064,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function n(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.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>';
-c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,J=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},A=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};A(e,"scroll",J);A(k,"scroll",J)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,q=e.length;f<q;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,J=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},B=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",J);B(k,"scroll",J)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 2b768689..9bc5d2f3 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -193,6 +193,7 @@ window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_C
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=require("@electron/remote").app.getLocale(),null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
+"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.proto="json",urlParams.prefetchFonts="1");
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}null==a&&"1"==urlParams.extAuth&&(a="sketch");try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch=
"1",a="min");return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
@@ -200,7 +201,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.5.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.5.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),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]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
@@ -2038,9 +2039,9 @@ Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIwIDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNWMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0wIDJ2M0g1VjVoMTV6bS01IDE0aC01di05aDV2OXpNNSAxMGgzdjlINXYtOXptMTIgOXYtOWgzdjloLTN6Ii8+PC9zdmc+";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=!0;Editor.simpleLabels=!1;
-Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
-Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
-Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
+Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
+Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;
+Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",g),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",g);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,c){var e=new Graph(null,c,null,null,b);e.transparentBackground=!1;var k=e.isCssTransformsSupported,g=this;e.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!g.chromeless||!mxClient.IS_SF)};this.chromeless||(e.isBlankLink=function(b){return!this.isExternalProtocol(b)});return e};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
@@ -2057,52 +2058,52 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};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,c,e,k,g,n,t,d,f,l,q){var m=f?57:0,p=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,F=Math.max(1,Math.round((y.width-e-v)/2)),D=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);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=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";F+=y.x;D+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(F,D,e,k);F=g.x;D=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=F+"px";E.style.top=D+"px";E.style.zIndex=
-this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=D+14+"px",n.style.left=F+e+38-m+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=
-n,!q)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){K=!0}),null,mxUtils.bind(this,function(d){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(p=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";F=Math.max(1,Math.round((f.width-e-v)/2));D=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(p,document.body.scrollWidth-v):p;k=Math.min(u,x-v);f=this.getPosition(F,
-D,e,k);F=f.x;D=f.y;E.style.left=F+"px";E.style.top=D+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=F+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,c,e,k,g,n,t,d,f,l,m){var p=f?57:0,q=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,D=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);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=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";D+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var E=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(D,C,e,k);D=g.x;C=g.y;E.style.width=e+"px";E.style.height=k+"px";E.style.left=D+"px";E.style.top=C+"px";E.style.zIndex=
+this.zIndex;E.appendChild(c);document.body.appendChild(E);!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=C+14+"px",n.style.left=D+e+38-p+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=
+n,!m)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){K=!0}),null,mxUtils.bind(this,function(d){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(q=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";D=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(q,document.body.scrollWidth-v):q;k=Math.min(u,x-v);f=this.getPosition(D,
+C,e,k);D=f.x;C=f.y;E.style.left=D+"px";E.style.top=C+"px";E.style.width=e+"px";E.style.height=k+"px";!d&&c.clientHeight>E.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=D+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=E;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":
IMAGE_PATH+"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,c,e,k,g,n,t,d,f,l,q){f=null!=f?f:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);m.appendChild(p)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;m.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=q&&q()}),l.className="geBtn",e.appendChild(l));var u=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
-u.className="geBtn";e.appendChild(u);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){u.focus()};m.appendChild(e);this.container=m},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(m.value)/100;isNaN(c)&&(c=1,m.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var p=d.checked?1:parseInt(q.value);isNaN(p)||(k=mxUtils.getScaleForPageCount(p,e,g))}e.getGraphBounds();var n=p=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),p-=c.x*g.width,n-=c.y*g.height):
-f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,p,n,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
+var ErrorDialog=function(b,c,e,k,g,n,t,d,f,l,m){f=null!=f?f:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);p.appendChild(q)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;p.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",e.appendChild(l));var u=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
+u.className="geBtn";e.appendChild(u);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){u.focus()};p.appendChild(e);this.container=p},PrintDialog=function(b,c){this.create(b,c)};
+PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var q=d.checked?1:parseInt(m.value);isNaN(q)||(k=mxUtils.getScaleForPageCount(q,e,g))}e.getGraphBounds();var n=q=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),q-=c.x*g.width,n-=c.y*g.height):
+f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,q,n,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
g.appendChild(f);mxEvent.addListener(f,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(g);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");g.appendChild(f);mxEvent.addListener(f,
-"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(q);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
-function(){l.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";g.appendChild(m);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});p.className="geBtn";g.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";g.appendChild(p);b.editor.cancelFirst||
+"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);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";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";g.appendChild(p);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
+g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});q.className="geBtn";g.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";g.appendChild(q);b.editor.cancelFirst||
g.appendChild(f);k.appendChild(g);t.appendChild(k);n.appendChild(t);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
PrintDialog.createPrintPreview=function(b,c,e,k,g,n,t){c=new mxPrintPreview(b,c,e,k,g,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=q,l.style.backgroundImage="")}function e(){var d=v;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(u.setAttribute("src",d.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=b.editor.graph,g,n,t=document.createElement("table");t.style.width=
+var PageSetupDialog=function(b){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function e(){var d=v;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(u.setAttribute("src",d.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=b.editor.graph,g,n,t=document.createElement("table");t.style.width=
"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");g.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",k.pageFormat);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");g.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var q=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=k.getGridSize();n.appendChild(m);mxEvent.addListener(m,"change",function(){var b=parseInt(m.value);m.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(n);d.appendChild(g);g=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");g.appendChild(n);n=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
-"60px";u.style.padding="4px";var v=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(v=b,e())},v);mxEvent.consume(d)};mxEvent.addListener(p,"click",y);mxEvent.addListener(u,"click",y);e();n.appendChild(u);n.appendChild(p);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";
-b.editor.cancelFirst&&n.appendChild(p);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(m.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,q,v,f.get());d.ignoreColor=k.background==q;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=v?v.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
-n.appendChild(y);b.editor.cancelFirst||n.appendChild(p);g.appendChild(n);d.appendChild(g);t.appendChild(d);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||m!=document.activeElement&&p!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],D?"custom"==l.key&&(d.value=l.key,D=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
-e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",q.style.display="none"):(m.value=e.width/100,p.value=e.height/100,n.setAttribute("checked","checked"),
-d.value="custom",f.style.display="none",q.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.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";n.style.marginRight="6px";f.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var q=document.createElement("div");q.style.marginLeft=
-"4px";q.style.width="210px";q.style.height="24px";var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";q.appendChild(m);mxUtils.write(q," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";q.appendChild(p);mxUtils.write(q," in");f.style.display="none";q.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var F=document.createElement("option");F.setAttribute("value",
-x.key);mxUtils.write(F,x.title);d.appendChild(F)}var D=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(q);var E=e,K=function(b,c){var l=u[d.value];null!=l.format?(m.value=l.format.width/100,p.value=l.format.height/100,q.style.display="none",f.style.display=""):(f.style.display="none",q.style.display="");l=parseFloat(m.value);if(isNaN(l)||0>=l)m.value=e.width/100;l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),
-Math.floor(100*parseFloat(p.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&D||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){n.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(m,"blur",K);mxEvent.addListener(m,"click",K);mxEvent.addListener(p,"blur",K);mxEvent.addListener(p,"click",K);mxEvent.addListener(t,"change",K);mxEvent.addListener(n,
-"change",K);mxEvent.addListener(d,"change",function(b){D="custom"==d.value;K(b,!0)});K();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:m,heightInput:p}};
+mxUtils.write(n,mxResources.get("background")+":");g.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=k.background;c();mxEvent.addListener(l,
+"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=k.getGridSize();n.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(n);d.appendChild(g);g=document.createElement("tr");
+n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");g.appendChild(n);n=document.createElement("td");var q=document.createElement("button");q.className="geBtn";q.style.margin="0px";mxUtils.write(q,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
+"60px";u.style.padding="4px";var v=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(v=b,e())},v);mxEvent.consume(d)};mxEvent.addListener(q,"click",y);mxEvent.addListener(u,"click",y);e();n.appendChild(u);n.appendChild(q);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";
+b.editor.cancelFirst&&n.appendChild(q);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(p.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,v,f.get());d.ignoreColor=k.background==m;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=v?v.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
+n.appendChild(y);b.editor.cancelFirst||n.appendChild(q);g.appendChild(n);d.appendChild(g);t.appendChild(d);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||p!=document.activeElement&&q!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],C?"custom"==l.key&&(d.value=l.key,C=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
+e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(p.value=e.width/100,q.value=e.height/100,n.setAttribute("checked","checked"),
+d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.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";n.style.marginRight="6px";f.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft=
+"4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var D=document.createElement("option");D.setAttribute("value",
+x.key);mxUtils.write(D,x.title);d.appendChild(D)}var C=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var E=e,K=function(b,c){var l=u[d.value];null!=l.format?(p.value=l.format.width/100,q.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.width/100;l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),
+Math.floor(100*parseFloat(q.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&C||l.width==E.width&&l.height==E.height||(E=l,null!=k&&k(E))};mxEvent.addListener(c,"click",function(b){n.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;K(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",K);mxEvent.addListener(p,"click",K);mxEvent.addListener(q,"blur",K);mxEvent.addListener(q,"click",K);mxEvent.addListener(t,"change",K);mxEvent.addListener(n,
+"change",K);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;K(b,!0)});K();return{set:function(b){e=b;g(null,null,!0)},get:function(){return E},widthInput:p,heightInput:q}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,q,m){f=null!=f?f:!0;var p,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";p=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");p.appendChild(u);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=m?m+"px":"180px";var F=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});F.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
-"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),F.click());b.stopPropagation();
-b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);p.appendChild(u);if(null!=g||null==t)y.appendChild(p),null!=q&&(u.appendChild(FilenameDialog.createTypeHint(b,x,q)),null!=b.editor.diagramFileTypes&&(p=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),p.appendChild(u),
-u=document.createElement("td"),u.style.whiteSpace="nowrap",p.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=m?m-40+"px":"190px",p.appendChild(u),y.appendChild(p)));null!=t&&(p=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),p.appendChild(u),y.appendChild(p));p=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
-null!=q?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});q.className="geBtn";b.editor.cancelFirst&&u.appendChild(q);null!=d&&(m=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),m.className="geBtn",u.appendChild(m));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&F.click()});u.appendChild(F);b.editor.cancelFirst||u.appendChild(q);p.appendChild(u);y.appendChild(p);
+var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,m,p){f=null!=f?f:!0;var q,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";q=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");q.appendChild(u);var x=document.createElement("input");
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var D=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),D.click());b.stopPropagation();
+b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);q.appendChild(u);if(null!=g||null==t)y.appendChild(q),null!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(q=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),q.appendChild(u),
+u=document.createElement("td"),u.style.whiteSpace="nowrap",q.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=p?p-40+"px":"190px",q.appendChild(u),y.appendChild(q)));null!=t&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),q.appendChild(u),y.appendChild(q));q=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
+null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",u.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&D.click()});u.appendChild(D);b.editor.cancelFirst||u.appendChild(m);q.appendChild(u);y.appendChild(q);
v.appendChild(y);this.container=v};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.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(c)});
@@ -2117,8 +2118,8 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=nul
b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,n=this.view.getBackgroundPageBounds();
-d=n.width;f=n.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,F=n.x+d,D=n.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
-Math.round(n.y+(f+1)*v.height)),new mxPoint(Math.round(F),Math.round(n.y+(f+1)*v.height))]:[new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(D))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+d=n.width;f=n.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,D=n.x+d,C=n.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
+Math.round(n.y+(f+1)*v.height)),new mxPoint(Math.round(D),Math.round(n.y+(f+1)*v.height))]:[new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
@@ -2127,24 +2128,24 @@ function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.is
this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),f=d.getParent(b),c=this.graph.view.getState(f),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(f)||d.isEdge(f));){var g=this.graph.isCellSelected(f),e=e||g;if(g||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=f;f=d.getParent(f)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var g=k.getGraphBounds;k.getGraphBounds=function(b){var d=g.apply(this,arguments);b=this.backgroundImage;if(null!=b){var f=this.view.translate,c=this.view.scale;d.add(new mxRectangle((f.x+b.x)*c,
(f.y+b.y)*c,b.width*c,b.height*c))}return d}}k.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.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,k.isEnabled=
function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var n="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var q=g[l],m=q.indexOf("=");if(0<=m){e=q.substring(0,m);var p=q.substring(m+1);null!=c[e]&&"none"==p&&(b.push(p),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",b,"cells",[d.cell]))}}catch(V){this.handleError(V)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var q=function(b,d,f,c,e,g,q){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
-if(q){q=[];for(var G=0;G<b.length;G++)q=q.concat(f.getDescendants(b[G]));b=q}f.beginUpdate();try{for(G=0;G<b.length;G++){var m=b[G],p;if(d)p=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(m),B=null!=v?v.split(";"):[];p=n.slice();for(var u=0;u<B.length;u++){var C=B[u],x=C.indexOf("=");if(0<=x){var y=C.substring(0,x),N=mxUtils.indexOf(p,y);0<=N&&p.splice(N,1);for(q=0;q<l.length;q++){var D=l[q];if(0<=mxUtils.indexOf(D,y))for(var A=0;A<D.length;A++){var E=mxUtils.indexOf(p,D[A]);0<=E&&p.splice(E,
-1)}}}}}var K=f.isEdge(m);q=K?e:c;for(var F=f.getStyle(m),u=0;u<p.length;u++){var y=p[u],Q=q[y];null!=Q&&("shape"!=y||K)&&(!K||g||0>mxUtils.indexOf(t,y))&&(F=mxUtils.setStyle(F,y,Q))}Editor.simpleLabels&&(F=mxUtils.setStyle(mxUtils.setStyle(F,"html",null),"whiteSpace",null));f.setStyle(m,F)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){q(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){q(d.getProperty("cells"),!0)});this.insertHandler=
-q;this.createDivs();this.createUi();this.refresh();var m=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=m,this.menubarContainer.onmousedown=m,this.toolbarContainer.onselectstart=m,this.toolbarContainer.onmousedown=m,this.diagramContainer.onselectstart=m,this.diagramContainer.onmousedown=m,this.sidebarContainer.onselectstart=m,this.sidebarContainer.onmousedown=m,
-this.formatContainer.onselectstart=m,this.formatContainer.onmousedown=m,this.footerContainer.onselectstart=m,this.footerContainer.onmousedown=m,null!=this.tabContainer&&(this.tabContainer.onselectstart=m));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return m(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var p=k.graphHandler.start;k.graphHandler.start=function(){null!=J.hoverIcons&&J.hoverIcons.reset();p.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],p=m.indexOf("=");if(0<=p){e=m.substring(0,p);var q=m.substring(p+1);null!=c[e]&&"none"==q&&(b.push(q),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",b,"cells",[d.cell]))}}catch(ca){this.handleError(ca)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
+if(m){m=[];for(var F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var p=b[F],q;if(d)q=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(p),u=null!=v?v.split(";"):[];q=n.slice();for(var A=0;A<u.length;A++){var I=u[A],x=I.indexOf("=");if(0<=x){var y=I.substring(0,x),N=mxUtils.indexOf(q,y);0<=N&&q.splice(N,1);for(m=0;m<l.length;m++){var C=l[m];if(0<=mxUtils.indexOf(C,y))for(var B=0;B<C.length;B++){var E=mxUtils.indexOf(q,C[B]);0<=E&&q.splice(E,
+1)}}}}}var K=f.isEdge(p);m=K?e:c;for(var D=f.getStyle(p),A=0;A<q.length;A++){var y=q[A],R=m[y];null!=R&&"edgeStyle"!=y&&("shape"!=y||K)&&(!K||g||0>mxUtils.indexOf(t,y))&&(D=mxUtils.setStyle(D,y,R))}Editor.simpleLabels&&(D=mxUtils.setStyle(mxUtils.setStyle(D,"html",null),"whiteSpace",null));f.setStyle(p,D)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),
+!0)});this.insertHandler=m;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=
+p,this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown=p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var q=k.graphHandler.start;k.graphHandler.start=function(){null!=J.hoverIcons&&J.hoverIcons.reset();q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
function(b){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,v=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return u||v.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?
mxEvent.isConsumed(b)||27!=b.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,
-arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var F=k.isZoomWheelEvent;
-k.isZoomWheelEvent=function(){return u||F.apply(this,arguments)};var D=!1,E=null,K=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
-this.toolbar.fontMenu=E;this.toolbar.sizeMenu=K}D=k.cellEditor.isContentEditing();E=b;K=f;L=d}}),J=this,A=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){A.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=J.toolbar&&(J.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),J.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},
-0))};mxEvent.addListener(k.cellEditor.textarea,"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(Q){J.handleError(Q)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var P=
+arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var D=k.isZoomWheelEvent;
+k.isZoomWheelEvent=function(){return u||D.apply(this,arguments)};var C=!1,E=null,K=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
+this.toolbar.fontMenu=E;this.toolbar.sizeMenu=K}C=k.cellEditor.isContentEditing();E=b;K=f;L=d}}),J=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=J.toolbar&&(J.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),J.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},
+0))};mxEvent.addListener(k.cellEditor.textarea,"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(R){J.handleError(R)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(V){}var P=
k.fireMouseEvent;k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();P.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,
-function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=J.hoverIcons&&J.hoverIcons.update(k.view.getState(f[f.length-1]))},0));q(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var q=0;q<e.length&&(l=k.getModel().isVertex(e[q])||l,!(g=k.getModel().isEdge(e[q])||g)||!l);q++);else g=l=!0;for(var e=c.getProperty("keys"),m=c.getProperty("values"),
-q=0;q<e.length;q++){var p=0<=mxUtils.indexOf(d,e[q]);if("strokeColor"!=e[q]||null!=m[q]&&"none"!=m[q])if(0<=mxUtils.indexOf(t,e[q]))g||0<=mxUtils.indexOf(f,e[q])?null==m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]:l&&0<=mxUtils.indexOf(n,e[q])&&(null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q]);else if(0<=mxUtils.indexOf(n,e[q])){if(l||p)null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q];if(g||p||0<=mxUtils.indexOf(f,e[q]))null==
-m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
+function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=J.hoverIcons&&J.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),p=c.getProperty("values"),
+m=0;m<e.length;m++){var q=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=p[m]&&"none"!=p[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]:l&&0<=mxUtils.indexOf(n,e[m])&&(null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m]);else if(0<=mxUtils.indexOf(n,e[m])){if(l||q)null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m];if(g||q||0<=mxUtils.indexOf(f,e[m]))null==
+p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),f=k.getView().getState(k.getSelectionCell());
@@ -2158,16 +2159,16 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,c=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));var e=mxUtils.bind(this,function(){c.hideShapePicker(!0)});b.addListener("wheel",e);b.addListener(mxEvent.ESCAPE,e);b.view.addListener(mxEvent.SCALE,e);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);b.getSelectionModel().addListener(mxEvent.CHANGE,e);b.getModel().addListener(mxEvent.CHANGE,
e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var g=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))g.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,q){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
-for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){q(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){m(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,n=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,n,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(n,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),f,!0);this.centerShapePicker(x,d,k,g,f);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=n.width/2-10,k-=n.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=n.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=n.width+6,k-=n.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=n.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
EditorUi.prototype.showShapePicker=function(b,c,e,k,g,n){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,n),n);null!=b&&(null==this.hoverIcons||n||this.hoverIcons.reset(),n=this.editor.graph,n.popupMenuHandler.hideMenu(),n.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,c,e,k,g,n,t,d){var f=null;if(null!=t&&0<t.length){var l=this,q=this.editor.graph,f=document.createElement("div");g=q.view.getState(e);var m=null==e||null!=g&&q.isTransparentState(g)?null:q.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(f.style.backgroundColor=q.background);q.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=m&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(m,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=q.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);f.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(f)}finally{q.model.endUpdate()}q.setSelectionCell(f);
-q.scrollCellToVisible(f);q.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(q.view.getState(f))}null!=n&&n()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0<t&&(f.style.top=Math.max(q.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(q.container.scrollLeft+q.container.offsetWidth);0<t&&(f.style.left=Math.max(q.container.scrollLeft+22,b-t)+"px")}return f};
+EditorUi.prototype.createShapePicker=function(b,c,e,k,g,n,t,d){var f=null;if(null!=t&&0<t.length){var l=this,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var p=null==e||null!=g&&m.isTransparentState(g)?null:m.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=p&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(p,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=m.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f);
+m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(f))}null!=n&&n()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<t&&(f.style.top=Math.max(m.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<t&&(f.style.left=Math.max(m.container.scrollLeft+22,b-t)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,c){var e=mxUtils.bind(this,function(b,c,e,t){return this.editor.graph.createVertex(null,null,t||"",0,0,c||120,e||60,b,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),
e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
@@ -2182,41 +2183,41 @@ e==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+b+"thindiamond":"g
e?"geSprite geSprite-"+b+"eronetoone":"ERmany"==e?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),e=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));e.setEnabled(c.isEnabled())};
EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},f=c.createCellLookup(e),l=c.cloneCells(e,null,d),g=new mxGraphModel,k=g.getChildAt(g.getRoot(),
-0),p=0;p<l.length;p++){g.add(k,l[p]);var n=c.view.getState(e[p]);if(null!=n){var v=c.getCellGeometry(l[p]);null!=v&&v.relative&&!g.isEdge(e[p])&&null==f[mxObjectIdentity.get(g.getParent(e[p]))]&&(v.offset=null,v.relative=!1,v.x=n.x/n.view.scale-n.view.translate.x,v.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
+0),q=0;q<l.length;q++){g.add(k,l[q]);var n=c.view.getState(e[q]);if(null!=n){var v=c.getCellGeometry(l[q]);null!=v&&v.relative&&!g.isEdge(e[q])&&null==f[mxObjectIdentity.get(g.getParent(e[q]))]&&(v.offset=null,v.relative=!1,v.x=n.x/n.view.scale-n.view.translate.x,v.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.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 b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),q=b.view.translate,k=b.view.scale,G=mxRectangle.fromRectangle(l);
-G.x=G.x/k-q.x;G.y=G.y/k-q.y;G.width/=k;G.height/=k;var q=b.container.scrollTop,m=b.container.scrollLeft,p=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)p+=3;var n=b.container.offsetWidth-p,p=b.container.offsetHeight-p;d=d?Math.max(.3,Math.min(f||1,n/G.width)):k;f=(n-d*G.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(p-d*G.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<n||l.height<p)b.view.scaleAndTranslate(d,Math.floor(f-
-G.x),Math.floor(v-G.y)),b.container.scrollTop=q*d/k,b.container.scrollLeft=m*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),m=b.view.translate,k=b.view.scale,F=mxRectangle.fromRectangle(l);
+F.x=F.x/k-m.x;F.y=F.y/k-m.y;F.width/=k;F.height/=k;var m=b.container.scrollTop,p=b.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var n=b.container.offsetWidth-q,q=b.container.offsetHeight-q;d=d?Math.max(.3,Math.min(f||1,n/F.width)):k;f=(n-d*F.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(q-d*F.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<n||l.height<q)b.view.scaleAndTranslate(d,Math.floor(f-
+F.x),Math.floor(v-F.y)),b.container.scrollTop=m*d/k,b.container.scrollLeft=p*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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 n=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var t=0,n=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
"8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="36px";b.style.filter="invert(100%)";c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&n(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=n(mxUtils.bind(this,
function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),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 l=n(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();
-mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
-"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");q()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",q)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var p=null,u=null,v=mxUtils.bind(this,function(b){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
+mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
+"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
+n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var q=null,u=null,v=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){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 f=x.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=f.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));f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),
-Editor.layersImage,mxResources.get("layers")),F=b.getModel();F.addListener(mxEvent.CHANGE,function(){x.style.display=1<F.getChildCount(F.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
-"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var D=this.lightboxToolbarActions[m];D.elem=n(D.fn,D.icon,D.tooltip)}null!=g.refreshBtn&&n(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,
+Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
+"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var C=this.lightboxToolbarActions[p];C.elem=n(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&n(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,
function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),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(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var E=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<E&&Math.abs(this.scrollTop-b.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var K=
b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}K.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-
-c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),J=b.view.getDrawPane();b.cumulativeZoomFactor=1;var A=null,M=null,P=null,T=null,N=null,Q=function(d){null!=A&&window.clearTimeout(A);window.setTimeout(function(){if(!b.isMouseDown||T)A=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
+c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),J=b.view.getDrawPane();b.cumulativeZoomFactor=1;var B=null,M=null,P=null,V=null,N=null,R=function(d){null!=B&&window.clearTimeout(B);window.setTimeout(function(){if(!b.isMouseDown||V)B=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)),J.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(J.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){J.style.transform="";H.style.transform=""},0)):(J.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
-f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,q=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,q=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,q+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),q*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==q||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=q*(b.cumulativeZoomFactor-1)));null!=N&&J.setAttribute("filter",
-N);b.cumulativeZoomFactor=1;N=T=M=P=A=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},ga=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-ga)){ga=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
+f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,m=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,m=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=P&&(g+=d.x-P.x,m+=d.y-P.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),m*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==m||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=m*(b.cumulativeZoomFactor-1)));null!=N&&J.setAttribute("filter",
+N);b.cumulativeZoomFactor=1;N=V=M=P=B=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},ba=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-ba)){ba=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==
N&&""!=J.getAttribute("filter")&&(N=J.getAttribute("filter"),J.removeAttribute("filter"));P=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;J.style.transformOrigin=d+"px "+l+"px";J.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
"scale("+this.cumulativeZoomFactor+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(d=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(f?b.container.clientWidth/2+b.container.scrollLeft-d.offsetLeft+"px":M.x+b.container.scrollLeft-d.offsetLeft-b.container.offsetLeft+"px")+" "+(f?b.container.clientHeight/2+b.container.scrollTop-d.offsetTop+"px":M.y+b.container.scrollTop-d.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,
-"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}Q(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=A&&window.clearTimeout(A)},null,function(d){1!=b.cumulativeZoomFactor&&Q(0)});mxEvent.addListener(b.container,"scroll",function(d){null==A||b.isMouseDown||1==b.cumulativeZoomFactor||Q(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));
-if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),T=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),
+"transform","scale("+this.cumulativeZoomFactor+")"));b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}R(c)}};mxEvent.addGestureListeners(b.container,function(b){null!=B&&window.clearTimeout(B)},null,function(d){1!=b.cumulativeZoomFactor&&R(0)});mxEvent.addListener(b.container,"scroll",function(d){null==B||b.isMouseDown||1==b.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,f,c,e,l){b.fireEvent(new mxEventObject("wheel"));
+if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!c&&b.isScrollWheelEvent(d))c=b.view.getTranslate(),e=40/b.view.scale,mxEvent.isShiftDown(d)?b.view.setTranslate(c.x+(f?-e:e),c.y):b.view.setTranslate(c.x,c.y+(f?e:-e));else if(c||b.isZoomWheelEvent(d))for(var g=mxEvent.getSource(d);null!=g;){if(g==b.container)return b.tooltipHandler.hideTooltip(),M=null!=e&&null!=l?new mxPoint(e,l):new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),V=c,b.lazyZoom(f),mxEvent.consume(d),!1;g=g.parentNode}}),
b.container);b.panningHandler.zoomGraph=function(d){b.cumulativeZoomFactor=d.scale;b.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),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 c=urlParams.border,e=60;null!=c&&(e=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,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))};
@@ -2248,10 +2249,10 @@ null!=b.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(b.isCon
this.actions.get("editLink").setEnabled(1==n.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);n=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(n);this.menus.get("insert").setEnabled(n);this.menus.get("direction").setEnabled(n&&c);this.menus.get("align").setEnabled(n&&
c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(n&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(n);this.actions.get("selectEdges").setEnabled(n);this.actions.get("selectAll").setEnabled(n);this.actions.get("selectNone").setEnabled(n);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&(n+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=n+t.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+g+"px";b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+20)),c=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",c+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",c+=this.toolbarHeight);0<c&&(c+=1);var n=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,n=Math.max(0,Math.min(e-c-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=n+"px";
+this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=c+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=c+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
+n+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+t.x+"px",this.diagramContainer.style.top=c+t.y+"px",this.diagramContainer.style.right=e+"px",this.diagramContainer.style.bottom=this.footerHeight+k+g+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2260,10 +2261,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var c=document.createElement("div");c.className=b;return c};
-EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=q()&&(f=!0,l=null)}}function n(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var q=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
-mxEvent.getClientY(b));d=q();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=q();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,n)})};
+EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=m()&&(f=!0,l=null)}}function n(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
+mxEvent.getClientY(b));d=m();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=m();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,n)})};
EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,n,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(b,c,e,k,g,n,t,d,f,l,q,m,p){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,n,t,m,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,q||100+20*c,!0,!1,p);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,n,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,n,t,d,f,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,c,e,k,g,n,t,d,f,l,m,p,q){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,n,t,p,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||100+20*c,!0,!1,q);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,n,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,n,t,d,f,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,c,e){null!=this.dialogs&&0<this.dialogs.length&&(null==e||e==this.dialog.container.firstChild)&&(e=this.dialogs.pop(),0==e.close(b,c)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var n=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==n||e.get(n)||(e.put(n,!0),k.push(n))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(n.container,230,g,!0,!1);n.init()};
@@ -2271,7 +2272,7 @@ EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind
EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),g="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=g.lastIndexOf("%3E");
-0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(q){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(q){}}catch(q){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(m){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(m){}}catch(m){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(c){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var c=null;if(null!=b&&0<b.length){var e="<meta "==b.substring(0,6),c=document.createElement("div");c.innerHTML=(e?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(b=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,b==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,b),asHtml=!1));e=e&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=e&&null==e.nextSibling&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==e.nodeName?(b=e.getAttribute("src"),
@@ -2293,7 +2294,7 @@ c=-d:38==b?e=-d:39==b?c=d:40==b&&(e=d),g.currentDx+=c*l,g.currentDy+=e*l,g.check
b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var l=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=l)return l.funct}if(null!=d[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var f=k.connectVertex(k.getSelectionCell(),
d[b.keyCode],k.defaultEdgeLength,b,!0);null!=f&&0<f.length&&(1==f.length&&k.model.isEdge(f[0])?k.setSelectionCell(k.model.getTerminal(f[0],!1)):k.setSelectionCell(f[f.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return f.apply(this,arguments)};g.bindAction=
-mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var l=this,q=g.escape;g.escape=function(b){q.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});g.bindAction(107,!0,"zoomIn");
+mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var l=this,m=g.escape;g.escape=function(b){m.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});g.bindAction(107,!0,"zoomIn");
g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){l.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",
!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),
g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),
@@ -2303,39 +2304,39 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],b=0;b<c.length;b++)null!=c[b]&&null!=c[b].parentNode&&c[b].parentNode.removeChild(c[b])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var b=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var k=0;k<b.length;k++)e=e.replace(new RegExp("&"+b[k][0]+";","g"),"&#"+b[k][1]+";");return c(e)}})();
Date.prototype.toISOString||function(){function b(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var g=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
-arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,q;l<d;)q=g[l],f[l]=k?"undefined"===typeof t?k(q,l):k.call(t,q,l):q,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,m;l<d;)m=g[l],f[l]=k?"undefined"===typeof t?k(m,l):k.call(t,m,l):m,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
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,c,e){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),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,c,e,k,g,n){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),q=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
-g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(g.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(l=m.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(m=this.selectionCellsHandler.getHandler(g.cell),null==m||null==m.getHandleForEvent(e))){var p=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);p.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),m=this.model.getParent(n);if(!this.isCellSelected(m)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(p,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(m,0)!=n||mxUtils.intersects(p,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(p,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
-this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(p,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))n=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,e.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m&&(v=m.getHandleForEvent(e),null!=v&&(m.start(e.getGraphX(),e.getGraphY(),v),m.blockDelayedSelection=!n,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(m=this.getActualStartSize(g.cell),
-(0<m.x||0<m.width)&&mxUtils.intersects(p,new mxRectangle(g.x+(m.x-m.width-1)*k+(0==m.x?g.width:0),g.y,1,g.height))||(0<m.y||0<m.height)&&mxUtils.intersects(p,new mxRectangle(g.x,g.y+(m.y-m.height-1)*k+(0==m.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),m=this.selectionCellsHandler.getHandler(g.cell),null!=m&&(v=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
+g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var p=this.selectionCellsHandler.getHandler(g.cell);null!=p&&null!=p.bends&&0<p.bends.length&&(l=p.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(p=this.selectionCellsHandler.getHandler(g.cell),null==p||null==p.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),p=this.model.getParent(n);if(!this.isCellSelected(p)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))n=this.selectionCellsHandler.isHandled(p),this.selectCellForEvent(p,e.getEvent()),p=this.selectionCellsHandler.getHandler(p),null!=p&&(v=p.getHandleForEvent(e),null!=v&&(p.start(e.getGraphX(),e.getGraphY(),v),p.blockDelayedSelection=!n,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(p=this.getActualStartSize(g.cell),
+(0<p.x||0<p.width)&&mxUtils.intersects(q,new mxRectangle(g.x+(p.x-p.width-1)*k+(0==p.x?g.width:0),g.y,1,g.height))||(0<p.y||0<p.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(p.y-p.height-1)*k+(0==p.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),p=this.selectionCellsHandler.getHandler(g.cell),null!=p&&(v=mxEvent.CUSTOM_HANDLE-p.customHandles.length+1,p.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
d){},mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
-var m=this.view.getEdgeStyle(e),p=m==mxEdgeStyle.EntityRelation;q||l!=mxEvent.LABEL_HANDLE||(g=l);if(p&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!p||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)p||g==mxEvent.LABEL_HANDLE||(p=e.absolutePoints,null!=p&&(null==m&&null==g||m==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
-t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,p[0].x,p[0].y)?g=0:mxUtils.contains(g,p[p.length-1].x,p[p.length-1].y)?g=k.bends.length-1:null!=m&&(2==p.length||3==p.length&&(0==Math.round(p[0].x-p[1].x)&&0==Math.round(p[1].x-p[2].x)||0==Math.round(p[0].y-p[1].y)&&0==Math.round(p[1].y-p[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==m?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());q=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),p=e.absolutePoints,null!=p)if(null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,p[0].x,p[0].y)||mxUtils.contains(g,p[p.length-1].x,p[p.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<p.length-1&&0<=g&&(k=0==Math.round(p[g].x-p[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
-new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(p=this.model.getParent(e.cell),m=this.model.getParent(p),!this.isCellSelected(m)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(p,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(m,0)!=p||mxUtils.intersects(g,
-new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(p=e;null==k&&null!=p&&(this.isTableCell(p.cell)||this.isTableRow(p.cell)||this.isTable(p.cell));){if(this.isSwimlane(p.cell)){var m=this.getActualStartSize(p.cell),n=this.view.scale;(0<m.x||0<m.width)&&mxUtils.intersects(g,new mxRectangle(p.x+(m.x-m.width-1)*n+(0==m.x?p.width*n:0),p.y,1,p.height))?k="col-resize":(0<m.y||0<m.height)&&mxUtils.intersects(g,new mxRectangle(p.x,p.y+(m.y-m.height-1)*n+(0==m.y?p.height:0),p.width,1))&&(k=
-"row-resize")}p=this.view.getState(this.model.getParent(p.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};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(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=m.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),k=0;k<l.width;k++)d.push(new mxRectangle(((l.x+k)*e+c.x)*g,(l.y*f+c.y)*g,e*g,f*g));for(k=1;k<l.height;k++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+k)*f+c.y)*g,e*g,f*g));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=p.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var g=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
+var p=this.view.getEdgeStyle(e),q=p==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(q&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!q||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)q||g==mxEvent.LABEL_HANDLE||(q=e.absolutePoints,null!=q&&(null==p&&null==g||p==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
+t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,q[0].x,q[0].y)?g=0:mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y)?g=k.bends.length-1:null!=p&&(2==q.length||3==q.length&&(0==Math.round(q[0].x-q[1].x)&&0==Math.round(q[1].x-q[2].x)||0==Math.round(q[0].y-q[1].y)&&0==Math.round(q[1].y-q[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==p?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
+k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),q=e.absolutePoints,null!=q)if(null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,q[0].x,q[0].y)||mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<q.length-1&&0<=g&&(k=0==Math.round(q[g].x-q[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
+new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(q=this.model.getParent(e.cell),p=this.model.getParent(q),!this.isCellSelected(p)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(q,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(p,0)!=q||mxUtils.intersects(g,
+new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(q=e;null==k&&null!=q&&(this.isTableCell(q.cell)||this.isTableRow(q.cell)||this.isTable(q.cell));){if(this.isSwimlane(q.cell)){var p=this.getActualStartSize(q.cell),n=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(g,new mxRectangle(q.x+(p.x-p.width-1)*n+(0==p.x?q.width*n:0),q.y,1,q.height))?k="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(g,new mxRectangle(q.x,q.y+(p.y-p.height-1)*n+(0==p.y?q.height:0),q.width,1))&&(k=
+"row-resize")}q=this.view.getState(this.model.getParent(q.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};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(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var b=p.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),k=0;k<l.width;k++)d.push(new mxRectangle(((l.x+k)*e+c.x)*g,(l.y*f+c.y)*g,e*g,f*g));for(k=1;k<l.height;k++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+k)*f+c.y)*g,e*g,f*g));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=q.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var g=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==g||f.get(g)||(f.put(g,!0),c.push(g))}return c};var u=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,F=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;F.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var D=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var K=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return K.apply(this,
+u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;D.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(b){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var K=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return K.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=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=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
-this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var A=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return A.apply(this,arguments)};this.selectRegion=function(b,d){var f=mxEvent.isAltDown(d)?b:null,f=this.getCells(b.x,
+this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var B=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return B.apply(this,arguments)};this.selectRegion=function(b,d){var f=mxEvent.isAltDown(d)?b:null,f=this.getCells(b.x,
b.y,b.width,b.height,null,null,f,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);if(this.isToggleEvent(d))for(var c=0;c<f.length;c++)this.selectCellForEvent(f[c],d);else this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),
"locked","0"))return!0;b=this.model.getParent(b)}return!1};var P=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();P=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),c=d.getProperty("cell");null==c?(f=mxUtils.convertPoint(this.container,
mxEvent.getClientX(f),mxEvent.getClientY(f)),v.start(f.x,f.y)):null!=P?this.addSelectionCells(P):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);P=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(b){b=T.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
+mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var V=this.updateMouseEvent;this.updateMouseEvent=function(b){b=V.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}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="Viewer does not support full SVG 1.1";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(" ");
@@ -2362,9 +2363,9 @@ c&&this.graph.isCustomLink(c)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return b&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var f=this.view.getState(b[d]);this.mergeStyle(f.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
c,d){if(null!=b){var f={},e;for(e in b){var g=b[e];null!=g&&(f[e]=!0,null==c[e]&&d?c[e]=g:c[e]!=g&&delete c[e])}for(e in c)f[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var f=this.model.getChildAt(b,d);if(this.isCellEditable(f)){b=f;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var f=b[d],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==c[g]&&f==mxConstants.NONE&&
-(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],p=b[d[g]];k==p||null==k&&p==mxConstants.NONE||this.setCellStyles(d[g],p,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],q=b[d[g]];k==q||null==k&&q==mxConstants.NONE||this.setCellStyles(d[g],q,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,f,e,g){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,f,e,g){f=null!=f?f:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
-null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),q=this.getScaledCellAt(b,c,k,f,e,g);if(null!=q)return q;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(q=this.view.getState(k),null!=q&&(null==g||!g(q,b,c))&&this.intersects(q,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
+null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),m=this.getScaledCellAt(b,c,k,f,e,g);if(null!=m)return m;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(m=this.view.getState(k),null!=m&&(null==g||!g(m,b,c))&&this.intersects(m,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(b){for(var c=this.getCellGeometry(b);null!=c&&c.relative;)b=this.getModel().getParent(b),c=this.getCellGeometry(b);return b};Graph.prototype.isPart=function(b){return"1"==mxUtils.getValue(this.getCurrentCellStyle(b),"part","0")||this.isTableCell(b)||this.isTableRow(b)};Graph.prototype.getCompositeParent=function(b){for(;this.isPart(b);){var c=this.model.getParent(b);
if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],f=0;f<c.length;f++)b(c[f])||d.push(c[f]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,d=this.graph.currentScale,
b=new mxRectangle((b.x+c.x)*d,(b.y+c.y)*d,b.width*d,b.height*d);return b};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(c){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=
@@ -2383,7 +2384,7 @@ mxUtils.getValue(e,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSp
k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var n=0;n<k.length;n++)g[k[n].nodeName]=k[n].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),n=0;n<g.length;n++)null!=g[n]&&null!=g[n].node&&c.push(g[n].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var g=this.view.getState(b[k]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&e.push(this.createVertexWipeAnimation(g,c)))}return e};
-Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var q=g*l,m=1;m<n;m++)if(q<=k[m-1]){f.push(new mxPoint(e[m-1].x+(e[m].x-e[m-1].x)*q/k[m-1],e[m-1].y+(e[m].y-e[m-1].y)*q/k[m-1]));break}else q-=k[m-1],f.push(e[m]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var m=g*l,p=1;p<n;p++)if(m<=k[p-1]){f.push(new mxPoint(e[p-1].x+(e[p].x-e[p-1].x)*m/k[p-1],e[p-1].y+(e[p].y-e[p-1].y)*m/k[p-1]));break}else m-=k[p-1],f.push(e[p]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=e,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var n=k/g;c||(n=1-n);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*n,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,n=0,t=mxUtils.bind(this,function(){if(n==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(n,e);n++}),g=window.setInterval(t,k);t()};
@@ -2397,29 +2398,29 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(b){var c=null;"date"==b?c=(new Date).toLocaleDateString():"time"==b?c=(new Date).toLocaleTimeString():"timestamp"==b?c=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),c=this.formatDate(new Date,b));return c};
Graph.prototype.formatDate=function(b,c,e){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 k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),q=b[d+"Month"](),m=b[d+"FullYear"](),p=b[d+"Hours"](),u=b[d+"Minutes"](),v=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:q+1,mm:t(q+1),mmm:k.i18n.monthNames[q],mmmm:k.i18n.monthNames[q+
-12],yy:String(m).slice(2),yyyy:m,h:p%12||12,hh:t(p%12||12),H:p,HH:t(p),M:u,MM:t(u),s:v,ss:t(v),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
+/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),m=b[d+"Month"](),p=b[d+"FullYear"](),q=b[d+"Hours"](),u=b[d+"Minutes"](),v=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
+12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:t(q%12||12),H:q,HH:t(q),M:u,MM:t(u),s:v,ss:t(v),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
b.length-1)})};Graph.prototype.getLayerForCells=function(b){var c=null;if(0<b.length){for(c=b[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var e=1;e<b.length;e++)if(!this.model.isAncestor(c,b[e])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),n=0;n<g;n++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
-"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"hideIt":"show",[f]));var q=document.createElement("img");q.setAttribute("draggable","false");q.setAttribute("align","absmiddle");q.setAttribute("border","0");q.style.position="relative";q.style.width="16px";q.style.padding="0px 6px 0 4px";c&&(q.style.filter="invert(100%)",q.style.top="-2px");l.appendChild(q);mxUtils.write(l,f);e.appendChild(l);
+Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),n=0;n<g;n++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
+"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"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";c&&(m.style.filter="invert(100%)",m.style.top="-2px");l.appendChild(m);mxUtils.write(l,f);e.appendChild(l);
mxEvent.addListener(l,"click",function(){k.setVisible(g,!k.isVisible(g));d();null!=b&&b(g)});d()})(k.getChildAt(k.root,n));return e};
Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=n.substring(1);else{var d=n.substring(1,n.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:n));g=match.index+n.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,c,e,k,g,n,t,d){n=n?n:!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),l=f?b:this.getCompositeParent(b),q=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(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(q.x+=l.geometry.width/2,q.y-=e):c==
-mxConstants.DIRECTION_SOUTH?(q.x+=l.geometry.width/2,q.y+=l.geometry.height+e):(q.x=c==mxConstants.DIRECTION_WEST?q.x-e:q.x+(l.geometry.width+e),q.y+=l.geometry.height/2);var m=this.view.getState(this.model.getParent(b));e=this.view.scale;var p=this.view.translate,l=p.x*e,p=p.y*e;null!=m&&this.model.isVertex(m.cell)&&(l=m.x,p=m.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(q.x+=b.parent.geometry.x,q.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+q.x*e,p+q.y*e)).grow(40*e);n=null!=n?
-this.getCells(0,0,0,0,null,null,n,null,!0):null;var m=this.view.getState(b),u=null,v=null;if(null!=n){n=n.reverse();for(var y=0;y<n.length;y++)if(!this.isCellLocked(n[y])&&!this.model.isEdge(n[y])&&n[y]!=b)if(!this.model.isAncestor(b,n[y])&&this.isContainer(n[y])&&(null==u||n[y]==this.model.getParent(b)))u=n[y];else if(null==v&&this.isCellConnectable(n[y])&&!this.model.isAncestor(n[y],b)&&!this.isSwimlane(n[y])){var x=this.view.getState(n[y]);null==m||null==x||mxUtils.intersects(m,x)||(v=n[y])}}var F=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;F&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?q.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=b.geometry.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-b.geometry.width/2:q.x+b.geometry.width/2);var D=[],E=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==E&&F){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?q.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=l.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-l.width/2:q.x+l.width/2),l.x=q.x-l.width/2,l.y=q.y-l.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),v=null):F&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var m=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&F||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var p=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=m.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==m.parent&&(p=e.parent.getIndex(e),this.model.add(e.parent,m,p))}null==v&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(p=b.parent.getIndex(b),this.model.add(b.parent,
-E,p));null!=m&&D.push(m);null==v&&null!=E&&D.push(E);null==E&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}}if(null!=d)d(D);else return D});if(null==t||null!=E||!F||null==v&&f)return g(E);t(l+q.x*e,p+q.y*e,g)};
+Graph.prototype.connectVertex=function(b,c,e,k,g,n,t,d){n=n?n:!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),l=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(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
+mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var p=this.view.getState(this.model.getParent(b));e=this.view.scale;var q=this.view.translate,l=q.x*e,q=q.y*e;null!=p&&this.model.isVertex(p.cell)&&(l=p.x,q=p.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+m.x*e,q+m.y*e)).grow(40*e);n=null!=n?
+this.getCells(0,0,0,0,null,null,n,null,!0):null;var p=this.view.getState(b),u=null,v=null;if(null!=n){n=n.reverse();for(var y=0;y<n.length;y++)if(!this.isCellLocked(n[y])&&!this.model.isEdge(n[y])&&n[y]!=b)if(!this.model.isAncestor(b,n[y])&&this.isContainer(n[y])&&(null==u||n[y]==this.model.getParent(b)))u=n[y];else if(null==v&&this.isCellConnectable(n[y])&&!this.model.isAncestor(n[y],b)&&!this.isSwimlane(n[y])){var x=this.view.getState(n[y]);null==p||null==x||mxUtils.intersects(p,x)||(v=n[y])}}var D=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;D&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],E=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==E&&D){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);E=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([E],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(E);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=u?(this.addCells([E],u,null,null,null,!0),v=null):D&&!f&&this.addCells([E],this.getDefaultParent(),null,null,null,!0)}var p=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&D||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,E,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=p.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==p.parent&&(q=e.parent.getIndex(e),this.model.add(e.parent,p,q))}null==v&&null!=E&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(q=b.parent.getIndex(b),this.model.add(b.parent,
+E,q));null!=p&&C.push(p);null==v&&null!=E&&C.push(E);null==E&&null!=p&&p.geometry.setTerminalPoint(m,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=E||!D||null==v&&f)return g(E);t(l+m.x*e,q+m.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}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};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var e=this.model.getParent(b);this.model.isVertex(e)&&this.isCellCollapsed(b)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(b,c,e){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(b));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,c){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var q=this.model.getParent(e[n]),m=this.layoutManager.getLayout(q);
-null==m?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,q,f,l):null!=g&&mxEvent.isAltDown(g)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(q,m,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var m=this.model.getParent(e[n]),p=this.layoutManager.getLayout(m);
+null==p?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var n=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=n&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var n=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=n&&(n=n.clone(),c.horizontal?n.width+=e+Math.min(0,t.width/this.view.scale-n.width):n.height+=k+Math.min(0,t.height/this.view.scale-n.height),this.model.setGeometry(b,
n));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2473,30 +2474,30 @@ Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,n,t,d,f){e=null
g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=n;g.geometry.height+=n;t=this.createVertex(null,null,"",0,n,c*e+n,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",n,0,e,k,d),c,e,0));
return 1<b?(t.geometry.y=k+n,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",n,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var q=this.getCellGeometry(n);null!=q&&(e||(e=b==t[t.length-1]),e&&(q=q.clone(),q.height+=c,k.setGeometry(n,q)));
+Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(n);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(n,m)));
null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),n=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(n,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),q=t[b],m=this.getCellGeometry(q);null!=m&&(m=m.clone(),m.width+=c,null!=m.alternateBounds&&(m.alternateBounds.width+=c),k.setGeometry(q,m));b<t.length-1&&(q=t[b+1],m=this.getCellGeometry(q),null!=m&&(m=m.clone(),
-m.x+=c,e||(m.width-=c,null!=m.alternateBounds&&(m.alternateBounds.width-=c)),k.setGeometry(q,m)))}if(d||e){var p=this.getCellGeometry(n);null!=p&&(p=p.clone(),p.width+=c,k.setGeometry(n,p))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),n=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(n,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],p=this.getCellGeometry(m);null!=p&&(p=p.clone(),p.width+=c,null!=p.alternateBounds&&(p.alternateBounds.width+=c),k.setGeometry(m,p));b<t.length-1&&(m=t[b+1],p=this.getCellGeometry(m),null!=p&&(p=p.clone(),
+p.x+=c,e||(p.width-=c,null!=p.alternateBounds&&(p.alternateBounds.width-=c)),k.setGeometry(m,p)))}if(d||e){var q=this.getCellGeometry(n);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(n,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};
TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),n=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*n/g,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k,g){var n=this.graph.getModel(),t=n.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var d=null,f=b.x,l=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var q=0;q<t.length;q++){var m=this.graph.getCellGeometry(t[q]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[q],m.width=c[q+1]-m.x,q==t.length-1&&q<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=f,f+=m.width,q==t.length-1?m.width=k-b.x-b.width-l:l+=m.width),m.alternateBounds=
-new mxRectangle(0,0,m.width,m.height),n.setGeometry(t[q],m));var p=!0;null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=m.alternateBounds?m.alternateBounds.width:m.width,p=!1,d.colspan--);var u=g[q];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=m.alternateBounds?m.alternateBounds.height:m.height,p=!1,u.rowspan--);n.setVisible(t[q],p);p=this.graph.getCurrentCellStyle(t[q],!0);m={style:p,cell:t[q],geo:m};if(null!=p){if(null==d||1>d.colspan)m.colspan=
-parseInt(p.colspan||0),d=m;if(null==u||1>u.rowspan)m.rowspan=parseInt(p.rowspan||0),g[q]=m}}return l};
-TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,q=t.getChildCells(b,!0),m=this.getSize(q,!1);if(0<f&&0<l&&0<q.length&&0<m){if(g){var p=this.graph.getCellGeometry(q[q.length-
-1]);null!=p&&(p=p.clone(),p.height=f-m+p.height,t.setGeometry(q[q.length-1],p))}for(var u=n?null:this.getRowLayout(q[0],l),v=[],y=c.y,x=0;x<q.length;x++)p=this.graph.getCellGeometry(q[x]),null!=p&&(p=p.clone(),p.x=c.x,p.width=l,p.y=Math.round(y),y=g||k?y+p.height:y+p.height/m*f,p.height=Math.round(y)-p.y,t.setGeometry(q[x],p)),d=Math.max(d,this.layoutRow(q[x],u,p.height,l,v));k&&f<m&&(e=e.clone(),e.height=y+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+
+TableLayout.prototype.layoutRow=function(b,c,e,k,g){var n=this.graph.getModel(),t=n.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var d=null,f=b.x,l=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var m=0;m<t.length;m++){var p=this.graph.getCellGeometry(t[m]);null!=p&&(p=p.clone(),p.y=b.y,p.height=e-b.y-b.height,null!=c?(p.x=c[m],p.width=c[m+1]-p.x,m==t.length-1&&m<c.length-2&&(p.width=k-p.x-b.x-b.width)):(p.x=f,f+=p.width,m==t.length-1?p.width=k-b.x-b.width-l:l+=p.width),p.alternateBounds=
+new mxRectangle(0,0,p.width,p.height),n.setGeometry(t[m],p));var q=!0;null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=p.alternateBounds?p.alternateBounds.width:p.width,q=!1,d.colspan--);var u=g[m];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=p.alternateBounds?p.alternateBounds.height:p.height,q=!1,u.rowspan--);n.setVisible(t[m],q);q=this.graph.getCurrentCellStyle(t[m],!0);p={style:q,cell:t[m],geo:p};if(null!=q){if(null==d||1>d.colspan)p.colspan=
+parseInt(q.colspan||0),d=p;if(null==u||1>u.rowspan)p.rowspan=parseInt(q.rowspan||0),g[m]=p}}return l};
+TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),p=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<p){if(g){var q=this.graph.getCellGeometry(m[m.length-
+1]);null!=q&&(q=q.clone(),q.height=f-p+q.height,t.setGeometry(m[m.length-1],q))}for(var u=n?null:this.getRowLayout(m[0],l),v=[],y=c.y,x=0;x<m.length;x++)q=this.graph.getCellGeometry(m[x]),null!=q&&(q=q.clone(),q.x=c.x,q.width=l,q.y=Math.round(y),y=g||k?y+q.height:y+q.height/p*f,q.height=Math.round(y)-q.y,t.setGeometry(m[x],q)),d=Math.max(d,this.layoutRow(m[x],u,q.height,l,v));k&&f<p&&(e=e.clone(),e.height=y+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+
c.x+Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var f=this.getState(b);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=c.apply(this,
arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.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 b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var g=new mxPoint(f,e);g.type=d;c.push(g);g=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==g||g.type!=
-d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],q=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,q.x,q.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],J=H.absolutePoints;if(null!=J&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<J.length-1;H++){for(var A=J[H+1],M=J[H],t=J[H+2];H<J.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,A.x,A.y)<1*this.scale*this.scale;)A=
-t,H++,t=J[H+2];t=mxUtils.intersection(q.x,q.y,k.x,k.y,M.x,M.y,A.x,A.y);if(null!=t&&(Math.abs(t.x-q.x)>g||Math.abs(t.y-q.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-A.x)>g||Math.abs(t.y-A.y)>g)){A=t.x-q.x;M=t.y-q.y;t={distSq:A*A+M*M,x:t.x,y:t.y};for(A=0;A<n.length;A++)if(n[A].distSq>t.distSq){n.splice(A,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)f=e(1,n[H].x,
+d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],m=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],J=H.absolutePoints;if(null!=J&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<J.length-1;H++){for(var B=J[H+1],M=J[H],t=J[H+2];H<J.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
+t,H++,t=J[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,B.x,B.y);if(null!=t&&(Math.abs(t.x-m.x)>g||Math.abs(t.y-m.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-B.x)>g||Math.abs(t.y-B.y)>g)){B=t.x-m.x;M=t.y-m.y;t={distSq:B*B+M*M,x:t.x,y:t.y};for(B=0;B<n.length;B++)if(n[B].distSq>t.distSq){n.splice(B,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)f=e(1,n[H].x,
n[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var n=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){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)n.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,q=null,m=[],p=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],J=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?J=d[0]:t==this.state.routedPoints.length-1&&(J=d[d.length-1]);var A=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-J.x,M=M.y/this.scale-J.y,H=H*H+M*M;null==p&&(p=new mxPoint(J.x-k.x,J.y-k.y),
-q=Math.sqrt(p.x*p.x+p.y*p.y),0<q?(p.x=p.x*e/q,p.y=p.y*e/q):p=null);H>e*e&&0<q&&(H=k.x-J.x,M=k.y-J.y,H=H*H+M*M,H>e*e&&(A=new mxPoint(J.x-p.x,J.y-p.y),H=new mxPoint(J.x+p.x,J.y+p.y),m.push(A),this.addPoints(b,m,f,c,!1,null,l),m=0>Math.round(p.x)||0==Math.round(p.x)&&0>=Math.round(p.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(A.x-p.y*m,A.y+p.x*m),b.lineTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(A.x+p.y*m,A.y-p.x*m),b.lineTo(A.x-p.y*m,A.y+p.x*m),b.moveTo(H.x-p.y*m,H.y+p.x*m),b.lineTo(H.x+p.y*
-m,H.y-p.x*m),b.moveTo(H.x,H.y)):"arc"==g?(m*=1.3,b.curveTo(A.x-p.y*m,A.y+p.x*m,H.x-p.y*m,H.y+p.x*m,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),m=[H],A=!0))}else p=null;A||(m.push(J),k=J)}this.addPoints(b,m,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var m=Math.cos(-k),p=Math.sin(-k),g=mxUtils.getRotatedPoint(g,m,p,q);m=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);m+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,m);0!=k&&(m=Math.cos(k),p=Math.sin(k),g=mxUtils.getRotatedPoint(g,m,p,q));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,m=null,p=[],q=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],J=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?J=d[0]:t==this.state.routedPoints.length-1&&(J=d[d.length-1]);var B=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-J.x,M=M.y/this.scale-J.y,H=H*H+M*M;null==q&&(q=new mxPoint(J.x-k.x,J.y-k.y),
+m=Math.sqrt(q.x*q.x+q.y*q.y),0<m?(q.x=q.x*e/m,q.y=q.y*e/m):q=null);H>e*e&&0<m&&(H=k.x-J.x,M=k.y-J.y,H=H*H+M*M,H>e*e&&(B=new mxPoint(J.x-q.x,J.y-q.y),H=new mxPoint(J.x+q.x,J.y+q.y),p.push(B),this.addPoints(b,p,f,c,!1,null,l),p=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(B.x-q.y*p,B.y+q.x*p),b.lineTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(B.x+q.y*p,B.y-q.x*p),b.lineTo(B.x-q.y*p,B.y+q.x*p),b.moveTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x+q.y*
+p,H.y-q.x*p),b.moveTo(H.x,H.y)):"arc"==g?(p*=1.3,b.curveTo(B.x-q.y*p,B.y+q.x*p,H.x-q.y*p,H.y+q.x*p,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),p=[H],B=!0))}else q=null;B||(p.push(J),k=J)}this.addPoints(b,p,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var p=Math.cos(-k),q=Math.sin(-k),g=mxUtils.getRotatedPoint(g,p,q,m);p=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);p+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,p);0!=k&&(p=Math.cos(k),q=Math.sin(k),g=mxUtils.getRotatedPoint(g,p,q,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
b[g]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)f=l,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(v){null!=window.console&&console.log("Error in shape: "+v)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
@@ -2517,28 +2518,28 @@ function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandl
";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,f){this.model.beginUpdate();
try{for(var c=0;c<f.length;c++)if(this.model.isVertex(f[c])||this.model.isEdge(f[c])){this.setCellStyles(b,null,[f[c]]);var e=this.getCellStyle(f[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,d,[f[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():
null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var f=0;f<b.length;f++){var c=b[f];d[mxObjectIdentity.get(c)]=c.getId();for(var e=this.model.getChildCount(c),g=0;g<e;g++)this.createCellLookup([this.model.getChildAt(c,g)],d)}return d};Graph.prototype.createCellMapping=function(b,d,f){f=null!=f?f:{};for(var c in b){var e=d[c];null==f[e]&&(f[e]=b[c].getId()||"")}return f};Graph.prototype.importGraphModel=function(b,
-d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=k){var q=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)m=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=m&&(b=b.concat(m));else{var m=g.getChildren(k[0]);null!=
-m&&(b=this.moveCells(m,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,q,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&(d=this.snap(d),f=this.snap(f));var p=this.getBoundingBoxFromGeometry(b,!0);null!=p&&this.moveCells(b,d-p.x,f-p.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],
-!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var q=this.view.getState(b[e]);if(null!=q){var m=this.getCellGeometry(f[e]);null!=m&&m.relative&&!this.model.isEdge(b[e])&&null==c.get(this.model.getParent(b[e]))&&(m.offset=null,m.relative=!1,m.x=q.x/q.view.scale-q.view.translate.x,m.y=q.y/q.view.scale-q.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=
+d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=k){var m=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)p=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=p&&(b=b.concat(p));else{var p=g.getChildren(k[0]);null!=
+p&&(b=this.moveCells(p,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,m,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&(d=this.snap(d),f=this.snap(f));var q=this.getBoundingBoxFromGeometry(b,!0);null!=q&&this.moveCells(b,d-q.x,f-q.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],
+!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var p=this.getCellGeometry(f[e]);null!=p&&p.relative&&!this.model.isEdge(b[e])&&null==c.get(this.model.getParent(b[e]))&&(p.offset=null,p.relative=!1,p.x=m.x/m.view.scale-m.view.translate.x,p.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=
function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,q){null==q&&(q=this.model.getParent(b),this.isTable(q)||this.isTableRow(q))&&(q=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,q]);this.model.setValue(c,"");var m=this.getChildCells(c,!0);for(d=0;d<m.length;d++){var p=this.getCellGeometry(m[d]);null!=p&&p.relative&&0<p.x&&this.model.remove(m[d])}var G=this.getChildCells(b,!0);for(d=0;d<G.length;d++)p=this.getCellGeometry(G[d]),null!=p&&p.relative&&
-0>=p.x&&this.model.remove(G[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[b]);var aa=this.model.getTerminal(c,!1);if(null!=aa){var v=this.getCurrentCellStyle(aa);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,
+Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,m]);this.model.setValue(c,"");var p=this.getChildCells(c,!0);for(d=0;d<p.length;d++){var q=this.getCellGeometry(p[d]);null!=q&&q.relative&&0<q.x&&this.model.remove(p[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)q=this.getCellGeometry(F[d]),null!=q&&q.relative&&
+0>=q.x&&this.model.remove(F[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[b]);var O=this.model.getTerminal(c,!1);if(null!=O){var v=this.getCurrentCellStyle(O);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,
null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&
-b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],m=0;m<b.length;m++)this.isTable(b[m])?k=k.concat(this.model.getChildCells(b[m],!0).reverse()):k.push(b[m]);b=k}this.model.beginUpdate();try{k=[];for(m=0;m<
-b.length;m++)if(null!=e&&this.isTableRow(b[m])){var p=this.model.getParent(b[m]),G=this.getCellGeometry(b[m]);this.isTable(p)&&k.push(p);if(null!=p&&null!=G&&this.isTable(p)&&this.isTable(e)&&(c||p!=e)){if(!c){var v=this.getCellGeometry(p);null!=v&&(v=v.clone(),v.height-=G.height,this.model.setGeometry(p,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=G.height,this.model.setGeometry(e,v));var aa=this.model.getChildCells(e,!0);if(0<aa.length){b[m]=c?this.cloneCell(b[m]):b[m];var u=this.model.getChildCells(b[m],
-!0),n=this.model.getChildCells(aa[0],!0),B=n.length-u.length;if(0<B)for(var C=0;C<B;C++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(b[m],x))}else if(0>B)for(C=0;C>B;C--)this.model.remove(u[u.length+C-1]);u=this.model.getChildCells(b[m],!0);for(C=0;C<n.length;C++){var ra=this.getCellGeometry(n[C]),t=this.getCellGeometry(u[C]);null!=ra&&null!=t&&(t=t.clone(),t.width=ra.width,this.model.setGeometry(u[C],t))}}}}for(var ua=q.apply(this,arguments),m=0;m<k.length;m++)!c&&this.model.contains(k[m])&&
-0==this.model.getChildCount(k[m])&&this.model.remove(k[m]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),ua)}finally{this.model.endUpdate()}return ua};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,
-g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,q=0;q<l.length;q++)0<=mxUtils.indexOf(b,l[q])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=m.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=
+b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],p=0;p<b.length;p++)this.isTable(b[p])?k=k.concat(this.model.getChildCells(b[p],!0).reverse()):k.push(b[p]);b=k}this.model.beginUpdate();try{k=[];for(p=0;p<
+b.length;p++)if(null!=e&&this.isTableRow(b[p])){var q=this.model.getParent(b[p]),F=this.getCellGeometry(b[p]);this.isTable(q)&&k.push(q);if(null!=q&&null!=F&&this.isTable(q)&&this.isTable(e)&&(c||q!=e)){if(!c){var O=this.getCellGeometry(q);null!=O&&(O=O.clone(),O.height-=F.height,this.model.setGeometry(q,O))}O=this.getCellGeometry(e);null!=O&&(O=O.clone(),O.height+=F.height,this.model.setGeometry(e,O));var v=this.model.getChildCells(e,!0);if(0<v.length){b[p]=c?this.cloneCell(b[p]):b[p];var u=this.model.getChildCells(b[p],
+!0),n=this.model.getChildCells(v[0],!0),A=n.length-u.length;if(0<A)for(var x=0;x<A;x++){var I=this.cloneCell(u[u.length-1]);null!=I&&(I.value="",this.model.add(b[p],I))}else if(0>A)for(x=0;x>A;x--)this.model.remove(u[u.length+x-1]);u=this.model.getChildCells(b[p],!0);for(x=0;x<n.length;x++){var Y=this.getCellGeometry(n[x]),t=this.getCellGeometry(u[x]);null!=Y&&null!=t&&(t=t.clone(),t.width=Y.width,this.model.setGeometry(u[x],t))}}}}for(var xa=m.apply(this,arguments),p=0;p<k.length;p++)!c&&this.model.contains(k[p])&&
+0==this.model.getChildCount(k[p])&&this.model.remove(k[p]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),xa)}finally{this.model.endUpdate()}return xa};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,
+g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,l[m])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=p.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=
function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var g=e[f];c.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,
-3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(va){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=
+3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(pa){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=
function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};
Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,g=!0,l=0;l<d.length&&g;l++)e=e&&this.isTable(d[l]),g=g&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||g||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,
arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&
-(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),p=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(p,!0);f.setGeometry(g,
-m);var G=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=G){var aa=null!=v?this.getConnectionConstraint(G,v,!0):null,n=null!=u?this.getConnectionConstraint(G,u,!1):null;this.setConnectionConstraint(g,l,!0,n);this.setConnectionConstraint(g,k,!1,aa);var B=mxUtils.getValue(G.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(G.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/2-m.height/2;m.y+=m.height/2-m.width/2;var C=m.width;m.width=m.height;m.height=C;f.setGeometry(g,m)}var x=this.view.getState(g);if(null!=x){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],ra=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,ra)+(d?-1:1),t.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var p=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||
-this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}p.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=
+(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var p=m.getTerminalPoint(!0),q=m.getTerminalPoint(!1);m.setTerminalPoint(p,!1);m.setTerminalPoint(q,!0);f.setGeometry(g,
+m);var F=this.view.getState(g),v=this.view.getState(l),O=this.view.getState(k);if(null!=F){var u=null!=v?this.getConnectionConstraint(F,v,!0):null,n=null!=O?this.getConnectionConstraint(F,O,!1):null;this.setConnectionConstraint(g,l,!0,n);this.setConnectionConstraint(g,k,!1,u);var A=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+A,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/2-m.height/2;m.y+=m.height/2-m.width/2;var x=m.width;m.width=m.height;m.height=x;f.setGeometry(g,m)}var I=this.view.getState(g);if(null!=I){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Y=mxUtils.getValue(I.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
+this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,Y)+(d?-1:1),t.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var q=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&
+(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}q.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=
function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);
f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=0;c<f.length;c++)d(f[c])};Graph.prototype.updateLabelElements=function(b,d,f){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var g=this.convertValueToString(b[e]);if(null!=g&&0<g.length){c.innerHTML=g;for(var l=c.getElementsByTagName(null!=f?f:"*"),k=0;k<l.length;k++)d(l[k]);
c.innerHTML!=g&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,f){d=Graph.zapGremlins(d);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var g=b.value.cloneNode(!0);
@@ -2560,31 +2561,31 @@ mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var f=Math.
d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),
"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=
l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",
-function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var p=this.moveCells([m[f]],e,e,!1)[0];g.push(p);if(d)c.add(q,m[f]);else{var G=
-q.getIndex(b[f]);c.add(q,m[f],G+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(q);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(q,u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),
+function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var p=c.getParent(b[f]);if(null!=p){var q=this.moveCells([m[f]],e,e,!1)[0];g.push(q);if(d)c.add(p,m[f]);else{var F=
+p.getIndex(b[f]);c.add(p,m[f],F+1)}if(this.isTable(p)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(p);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(p,u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),
e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);
document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=
this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):
-k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var q=this.view.getState(this.model.getParent(f[g].cell)),p=this.getCellGeometry(f[g].cell),c=c+m;null!=p&&null!=q&&(p=p.clone(),b?p.x=Math.round(c-p.width/2)-q.origin.x:p.y=Math.round(c-p.height/2)-q.origin.y,this.getModel().setGeometry(f[g].cell,p))}}finally{this.getModel().endUpdate()}}}return d};
+k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var p=this.view.getState(this.model.getParent(f[g].cell)),q=this.getCellGeometry(f[g].cell),c=c+m;null!=q&&null!=p&&(q=q.clone(),b?q.x=Math.round(c-q.width/2)-p.origin.x:q.y=Math.round(c-q.height/2)-p.origin.y,this.getModel().setGeometry(f[g].cell,q))}}finally{this.getModel().endUpdate()}}}return d};
Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=
-function(b,d,f,c,e,g,l,k,m,q,p,G,v,u){var n=null;if(null!=u)for(n=new mxDictionary,p=0;p<u.length;p++)n.put(u[p],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;g=null!=g?g:!0;l=null!=l?l:!0;var B="page"==v?this.view.getBackgroundPageBounds():g&&null==n||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),C=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&B.add(new mxRectangle((this.view.translate.x+
-this.backgroundImage.x)*C,(this.view.translate.y+this.backgroundImage.y)*C,this.backgroundImage.width*C,this.backgroundImage.height*C));if(null==B)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",
-mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/C;var y=Math.max(1,Math.ceil(B.width*b)+2*f)+(q?5:0),I=Math.max(1,Math.ceil(B.height*b)+2*f)+(q?5:0);t.setAttribute("version","1.1");t.setAttribute("width",y+"px");t.setAttribute("height",I+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+y+" "+I);x.appendChild(t);var D=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");t.appendChild(D);var V=
-this.createSvgCanvas(D);V.foOffset=e?-.5:0;V.textOffset=e?-.5:0;V.imageOffset=e?-.5:0;V.translate(Math.floor(f/d-B.x/C),Math.floor(f/d-B.y/C));var aa=document.createElement("div"),U=V.getAlternateText;V.getAlternateText=function(b,d,f,c,e,g,l,k,m,q,p,z,pa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(aa.innerHTML=g,g=mxUtils.extractTextWithWhitespace(aa.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),sa=[],Ta=0,G=0;(0==Wa||Ta<Wa)&&G<g.length;){var Ua=g.charCodeAt(G);
-if(10==Ua||13==Ua){if(0<Ta)break}else sa.push(g.charAt(G)),255>Ua&&Ta++;G++}sa.length<g.length&&1<g.length-sa.length&&(g=mxUtils.trim(sa.join(""))+"...");return g}catch(gb){return U.apply(this,arguments)}else return U.apply(this,arguments)};var A=this.backgroundImage;if(null!=A){d=C/d;var N=this.view.translate,ra=new mxRectangle((A.x+N.x)*d,(A.y+N.y)*d,A.width*d,A.height*d);mxUtils.intersects(B,ra)&&V.image(A.x+N.x,A.y+N.y,A.width,A.height,A.src,!0)}V.scale(b);V.textEnabled=l;k=null!=k?k:this.createSvgImageExport();
-var E=k.drawCellState,ba=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=ba.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=n?n.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==n||c)&&null!=e;)c=null!=n?n.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==n||c)&&E.apply(this,
-arguments)};k.drawState(this.getView().getState(this.model.root),V);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(V,t);return t}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
+function(b,d,f,c,e,g,l,k,m,p,q,F,v,u){var n=null;if(null!=u)for(n=new mxDictionary,q=0;q<u.length;q++)n.put(u[q],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;g=null!=g?g:!0;l=null!=l?l:!0;var A="page"==v?this.view.getBackgroundPageBounds():g&&null==n||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),x=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&A.add(new mxRectangle((this.view.translate.x+
+this.backgroundImage.x)*x,(this.view.translate.y+this.backgroundImage.y)*x,this.backgroundImage.width*x,this.backgroundImage.height*x));if(null==A)throw Error(mxResources.get("drawingEmpty"));var I=mxUtils.createXmlDocument(),t=null!=I.createElementNS?I.createElementNS(mxConstants.NS_SVG,"svg"):I.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==I.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",
+mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/x;var O=Math.max(1,Math.ceil(A.width*b)+2*f)+(p?5:0),G=Math.max(1,Math.ceil(A.height*b)+2*f)+(p?5:0);t.setAttribute("version","1.1");t.setAttribute("width",O+"px");t.setAttribute("height",G+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+O+" "+G);I.appendChild(t);var y=null!=I.createElementNS?I.createElementNS(mxConstants.NS_SVG,"g"):I.createElement("g");t.appendChild(y);var B=
+this.createSvgCanvas(y);B.foOffset=e?-.5:0;B.textOffset=e?-.5:0;B.imageOffset=e?-.5:0;B.translate(Math.floor(f/d-A.x/x),Math.floor(f/d-A.y/x));var C=document.createElement("div"),S=B.getAlternateText;B.getAlternateText=function(b,d,f,c,e,g,l,k,m,p,q,z,qa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(C.innerHTML=g,g=mxUtils.extractTextWithWhitespace(C.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ta=[],Ta=0,F=0;(0==Wa||Ta<Wa)&&F<g.length;){var Ua=g.charCodeAt(F);
+if(10==Ua||13==Ua){if(0<Ta)break}else ta.push(g.charAt(F)),255>Ua&&Ta++;F++}ta.length<g.length&&1<g.length-ta.length&&(g=mxUtils.trim(ta.join(""))+"...");return g}catch(gb){return S.apply(this,arguments)}else return S.apply(this,arguments)};var Y=this.backgroundImage;if(null!=Y){d=x/d;var N=this.view.translate,ca=new mxRectangle((Y.x+N.x)*d,(Y.y+N.y)*d,Y.width*d,Y.height*d);mxUtils.intersects(A,ca)&&B.image(Y.x+N.x,Y.y+N.y,Y.width,Y.height,Y.src,!0)}B.scale(b);B.textEnabled=l;k=null!=k?k:this.createSvgImageExport();
+var E=k.drawCellState,X=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=X.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=n?n.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==n||c)&&null!=e;)c=null!=n?n.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==n||c)&&E.apply(this,
+arguments)};k.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(B,t);return t}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=b.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x",
"50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(g);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};
Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=
b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,f){for(;null!=b&&b.nodeName!=d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=
function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var g=
this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=g&&null!=l&&(l=l.clone(),l.height-=g.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var g=
-f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<l.length;g++){var m=f.getChildCells(l[g],!0)[e],q=f.cloneCell(m,!1),p=this.getCellGeometry(q);q.value=null;if(null!=p){var k=p.width,G=this.getCellGeometry(l[g]);null!=G&&(p.height=G.height)}f.add(l[g],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&
+f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<l.length;g++){var m=f.getChildCells(l[g],!0)[e],p=f.cloneCell(m,!1),q=this.getCellGeometry(p);p.value=null;if(null!=q){var k=q.width,F=this.getCellGeometry(l[g]);null!=F&&(q.height=F.height)}f.add(l[g],p,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&
(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.deleteLane=function(b){var d=this.getModel();d.beginUpdate();try{var f=null,f="stackLayout"==this.getCurrentCellStyle(b).childLayout?b:d.getParent(b),c=d.getChildCells(f,!0);0==c.length?d.remove(f):(f==b&&(b=c[c.length-1]),d.remove(b))}finally{d.endUpdate()}};Graph.prototype.insertLane=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=null,e=b;if("stackLayout"==this.getCurrentCellStyle(e).childLayout)var c=
e,g=f.getChildCells(c,!0),e=g[d?0:g.length-1];else c=f.getParent(e);var l=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;f.add(c,e,l+(d?0:1))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=
-this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var p=this.getCellGeometry(c);null!=p&&(p=p.clone(),p.height+=m.height,f.setGeometry(c,p))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,
-!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();
+this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var p=this.getCellGeometry(b);null!=p&&(p.height=m.height)}f.add(c,e,k+(d?0:1));var q=this.getCellGeometry(c);null!=q&&(q=q.clone(),q.height+=m.height,f.setGeometry(c,q))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,
+!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=b,d.setGeometry(f,p))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();
try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);null!=g&&(b=g.height);var l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(f,l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var f=b.tBodies[0],c=f.rows[0].cells,e=0,g=0;g<c.length;g++)var l=c[g].getAttribute("colspan"),
e=e+(null!=l?parseInt(l):1);f=f.insertRow(d);for(g=0;g<e;g++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var f=b.tHead;if(null!=f)for(var c=0;c<f.rows.length;c++){var e=document.createElement("th");f.rows[c].appendChild(e);mxUtils.br(e)}f=b.tBodies[0];for(c=0;c<f.rows.length;c++)e=f.rows[c].insertCell(d),mxUtils.br(e);return f.rows[0].cells[0<=d?d:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
function(b,d){if(0<=d)for(var f=b.tBodies[0].rows,c=0;c<f.length;c++)f[c].cells.length>d&&f[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var f=document.createElement("div");f.innerHTML=b;b=document.createDocumentFragment();for(var c;c=f.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};
@@ -2595,13 +2596,13 @@ f=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());e.apply(this,
function(){if(!this.isEditing()){var d=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(e.getX()+d.x+1,e.getY()+d.y+1,b,e.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[b,e,g])})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};
mxCellEditor.prototype.isTextSelected=function(){var b="";window.getSelection?b=window.getSelection():document.getSelection?b=document.getSelection():document.selection&&(b=document.selection.createRange().text);return""!=b};mxCellEditor.prototype.insertTab=function(b){var d=this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));f.insertNode(b);
f.setStartAfter(b);f.setEndAfter(b);d.removeAllRanges();d.addRange(f)};mxCellEditor.prototype.alignText=function(b,d){var f=null!=d&&mxEvent.isShiftDown(d);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=
-function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(oa){}};
+function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(ua){}};
var v=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,
"color",b.text,d);v.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?
-x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var F=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);F.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;
+x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);D.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;
for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=b.firstChild;null!=d;){var f=d.nextSibling;c(d);d=f}1==b.nodeType&&("BR"===b.nodeName||null!=b.firstChild)||3==b.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(b)).length?(3==b.nodeType&&mxUtils.setTextContent(b,mxUtils.getTextContent(b).replace(/\n|\r/g,
-"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+"")),1==b.nodeType&&(b.removeAttribute("style"),b.removeAttribute("class"),b.removeAttribute("width"),b.removeAttribute("cellpadding"),b.removeAttribute("cellspacing"),b.removeAttribute("border"))):b.parentNode.removeChild(b)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(b){var c=d(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]>")?f(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var b=this.graph.view.getState(this.editingCell);if(null!=b){var d=null!=b&&"0"!=mxUtils.getValue(b.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(d?
m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&
mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,k=[];(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&k.push("underline");(mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+
@@ -2613,32 +2614,32 @@ mxConstants.ALIGN_CENTER),mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_AL
this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);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("+f+","+
f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",E.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(b,d){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(b.cell,d);"1"==mxUtils.getValue(b.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=
mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(b){if("0"==mxUtils.getValue(b.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(b.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(b){this.codeViewMode&&this.toggleViewMode();
-K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(aa){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{L.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(O){}};var L=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(b,d){this.graph.getModel().beginUpdate();try{L.apply(this,arguments),""==d&&this.graph.isCellDeletable(b.cell)&&0==this.graph.model.getChildCount(b.cell)&&this.graph.isTransparentState(b)&&this.graph.removeCells([b.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
function(b){var d=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=b.cell.geometry&&0<b.cell.geometry.width)||0==mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(b){var d=this.graph.getView().scale;return new mxRectangle(0,
0,null==b.text?30:b.text.size*d+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(b,d){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(d.getEvent)};mxGraphView.prototype.formatUnitText=function(b){return b?c(b,this.unit):b};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));
var f=this.graph.view.translate,e=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/e-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/e-f.y);e=this.graph.view.unit;this.hint.innerHTML=c(d,e)+", "+c(f,e);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 H=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(b,d){H.apply(this,arguments);var f=this.graph.getCellStyle(b);if(null==f.childLayout){var c=this.graph.model.getParent(b),e=null!=c?this.graph.getCellGeometry(c):null;if(null!=e&&(f=this.graph.getCellStyle(c),"stackLayout"==f.childLayout)){var g=parseFloat(mxUtils.getValue(f,"stackBorder",mxStackLayout.prototype.border)),f="1"==mxUtils.getValue(f,"horizontalStack",
"1"),l=this.graph.getActualStartSize(c),e=e.clone();f?e.height=d.height+l.y+l.height+2*g:e.width=d.width+l.x+l.width+2*g;this.graph.model.setGeometry(c,e)}}};var J=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function b(b){f.get(b)||(f.put(b,!0),e.push(b))}for(var d=J.apply(this,arguments),f=new mxDictionary,c=this.graph.model,e=[],g=0;g<d.length;g++){var l=d[g];this.graph.isTableCell(l)?b(c.getParent(c.getParent(l))):
-this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var A=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=A.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var M=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(b){var d=M.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=
+this.graph.isTableRow(l)&&b(c.getParent(l));b(l)}return e};var B=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(b){var d=B.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var M=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(b){var d=M.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};mxVertexHandler.prototype.rotationHandleVSpacing=
-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var b=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+b.x/2,this.bounds.y+this.rotationHandleVSpacing-b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.graph.isRecursiveVertexResize(b)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(b,d){return!(!this.graph.isSwimlane(b.cell)&&0<this.graph.model.getChildCount(b.cell)&&
!this.graph.isCellCollapsed(b.cell)&&"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var P=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return P.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 T=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return T.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
-function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var ga=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=ga.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),q=null!=m.alternateBounds?
-m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=q.width*d.view.scale,l.height=q.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+1]:null,m=null!=m?d.getCellGeometry(m):null,p=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var G=0;l.shape.node.parentNode.insertBefore(l.shape.node,
-l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==G?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(q.width+G)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var v=!1;l.setPosition=function(b,d,f){G=Math.max(Graph.minTableColumnWidth-
-q.width,d.x-b.x-q.width);v=mxEvent.isShiftDown(f.getEvent());null==p||v||(G=Math.min(G,p.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=G)d.setTableColumnWidth(this.state.cell,G,v);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}G=0};l.positionChanged=function(){};l.reset=function(){G=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,
+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 V=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return V.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
+function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var R=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return R.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var ba=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=ba.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),p=null!=m.alternateBounds?
+m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=p.width*d.view.scale,l.height=p.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+1]:null,m=null!=m?d.getCellGeometry(m):null,q=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var F=0;l.shape.node.parentNode.insertBefore(l.shape.node,
+l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==F?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(p.width+F)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var v=!1;l.setPosition=function(b,d,f){F=Math.max(Graph.minTableColumnWidth-
+p.width,d.x-b.x-p.width);v=mxEvent.isShiftDown(f.getEvent());null==q||v||(F=Math.min(F,q.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=F)d.setTableColumnWidth(this.state.cell,F,v);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}F=0};l.positionChanged=function(){};l.reset=function(){F=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,
1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};
-f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var G=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){G.apply(this,
+f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){F.apply(this,
arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=
[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height="4px";f.style.padding="4px 2px 4px 2px";f.rowState=d;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(b)&&this.graph.isCellSelected(d.cell)||this.graph.selectCellForEvent(d.cell,
b);mxEvent.isPopupTrigger(b)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0);mxEvent.consume(b)}),null,mxUtils.bind(this,function(b){mxEvent.isPopupTrigger(b)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(b),mxEvent.getClientY(b),d.cell,b),mxEvent.consume(b))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(b.getChildAt(this.state.cell,
-d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var C=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);
+d)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var b=0;b<this.customHandles.length;b++)this.customHandles[b].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var I=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var b=new mxPoint(0,0),d=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);
f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var e=this.customHandles[c].shape.bounds,g=e.getCenterX(),l=e.getCenterY();if(Math.abs(this.state.x-g)<e.width/2||Math.abs(this.state.y-l)<e.height/2||Math.abs(this.state.x+this.state.width-g)<e.width/2||Math.abs(this.state.y+this.state.height-l)<e.height/
-2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=C.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){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{d=
+2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,this.graph.isTable(this.state.cell)&&(d+=7),b.x=this.sizers[0].bounds.width+d,b.y=this.sizers[0].bounds.height+d):b=I.apply(this,arguments);return b};mxVertexHandler.prototype.updateHint=function(d){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{d=
this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/d),f)+" x "+c(this.roundLength(this.bounds.height/d),f)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.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 B=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){B.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(b,d){U.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,g=this.graph.view.scale,l=this.roundLength(f.x/g-e.x),e=this.roundLength(f.y/g-e.y),g=this.graph.view.unit;this.hint.innerHTML=c(l,g)+", "+c(e,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
+mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var A=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(b,d){A.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 S=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+function(b,d){S.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,f){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,g=this.graph.view.scale,l=this.roundLength(f.x/g-e.x),e=this.roundLength(f.y/g-e.y),g=this.graph.view.unit;this.hint.innerHTML=c(l,g)+", "+c(e,g);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(l=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*l.x)+"%, "+Math.round(100*l.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=
mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=
mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",
@@ -2649,64 +2650,64 @@ Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototy
HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);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(b){return!mxEvent.isShiftDown(b.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(b){return!mxEvent.isShiftDown(b.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(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var I=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){I.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<
+function(b){return mxEvent.isMouseEvent(b.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var G=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){G.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<
this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&
mxEvent.isShiftDown(b.getEvent())&&mxEvent.isAltDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,g=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,g=(this.currentX-c)/this.graph.view.scale,
-l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);
-null!=m&&null!=q&&(q=q.clone(),q.translate(g,l),this.graph.model.setGeometry(k[f],q))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-
+l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),p=this.graph.getCellGeometry(k[f]);
+null!=m&&null!=p&&(p=p.clone(),p.translate(g,l),this.graph.model.setGeometry(k[f],p))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-
f,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(g)>l)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<
this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-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)),d.consume()}};var ba=mxRubberband.prototype.reset;
-mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ba.apply(this,arguments)};var V=(new Date).getTime(),qa=0,ma=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){ma.apply(this,arguments);f!=this.currentTerminalState?(V=(new Date).getTime(),qa=0):qa=(new Date).getTime()-V;this.currentTerminalState=f};var ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=
-function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<qa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,
-c,f):null,f=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;
-mxVertexHandler.prototype.createSizerShape=function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return na.apply(this,arguments)};var Y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),
-null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return Y.apply(this,arguments)};var ka=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=ka.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var la=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),
-f=d.getParent(b.cell),c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):la.apply(this,arguments)};var ca=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ca.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var R=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){R.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 Z=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){Z.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 W=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){W.apply(this,arguments);var b=!1;null!=
-this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
+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)),d.consume()}};var X=mxRubberband.prototype.reset;
+mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);X.apply(this,arguments)};var ca=(new Date).getTime(),ma=0,fa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,d,f,c){fa.apply(this,arguments);f!=this.currentTerminalState?(ca=(new Date).getTime(),ma=0):ma=(new Date).getTime()-ca;this.currentTerminalState=f};var na=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=
+function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3<ma||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&na.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(b,d){var f=null!=b&&0==b,c=this.state.getVisibleTerminalState(f),e=null!=b&&(0==b||b>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,
+c,f):null,f=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),e):null)?this.fixedHandleImage:null!=e&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ka=mxVertexHandler.prototype.createSizerShape;
+mxVertexHandler.prototype.createSizerShape=function(b,d,f){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ka.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var d=this.graph.getModel(),f=d.getParent(b[0]),c=this.graph.getCellGeometry(b[0]);if(d.isEdge(f)&&null!=c&&c.relative&&(d=this.graph.view.getState(b[0]),
+null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return oa.apply(this,arguments)};var Z=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var b=Z.apply(this,arguments),d=[],f=0;f<b.length;f++)"1"!=mxUtils.getValue(b[f].style,"part","0")&&d.push(b[f]);return d};var la=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var d=this.graph.getModel(),
+f=d.getParent(b.cell),c=this.graph.getCellGeometry(b.cell);return d.isEdge(f)&&null!=c&&c.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(d=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):la.apply(this,arguments)};var aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,d){var f=this.graph.getModel(),c=f.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!f.isEdge(c)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&aa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var b=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&b==mxConstants.NONE&&d==mxConstants.NONE?(b=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,b,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var T=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,d){T.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 ra=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(b,d){ra.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 Q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Q.apply(this,arguments);var b=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var d=0;4>d;d++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());
this.cornerHandles.push(f)}}var c=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(b,d){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,
this.changeHandler);this.editingHandler=mxUtils.bind(this,function(b,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);d=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(d,f);if(null!=d||null!=f&&0<f.length)b=!0;b&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,f){try{if(null==d&&(null==f||0==f.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=d||null!=f&&0<f.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.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===
typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(b)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",
-[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(xa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;
+[mxResources.get("link")]),mxUtils.bind(this,function(b){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(b)}))}if(null!=f)for(c=0;c<f.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[c].getAttribute("href"),mxUtils.getTextContent(f[c])));this.linkHint.appendChild(e)}}}catch(sa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;
mxEdgeHandler.prototype.init=function(){da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var b=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(d,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);if(null!=d||null!=f&&0<f.length)this.updateLinkHint(d,f),this.redrawHandles()};var ia=mxConnectionHandler.prototype.init;
-mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ta=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
+mxConnectionHandler.prototype.init=function(){ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var wa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.left=this.moveHandles[b].rowState.x+this.moveHandles[b].rowState.width-5+"px",this.moveHandles[b].style.top=this.moveHandles[b].rowState.y+
this.moveHandles[b].rowState.height/2-6+"px";if(null!=this.cornerHandles){var b=this.getSelectionBorderInset(),d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].bounds.width/2+b;d[0].bounds.y=this.state.y-f+b;d[0].redraw();d[1].bounds.x=d[0].bounds.x+this.state.width-2*b;d[1].bounds.y=d[0].bounds.y;d[1].redraw();d[2].bounds.x=d[0].bounds.x;d[2].bounds.y=this.state.y+this.state.height-2*b;d[2].redraw();d[3].bounds.x=d[1].bounds.x;d[3].bounds.y=d[2].bounds.y;d[3].redraw();
-for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].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":"");ta.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].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":"");wa.apply(this);null!=this.state&&null!=this.linkHint&&(b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",b),b=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=d&&(f=Math.max(f,d.y+d.height)),this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/
-2+Editor.hintOffset)+"px")};var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){S.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
+2+Editor.hintOffset)+"px")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&
this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].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 ea=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ea.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var ha=mxEdgeHandler.prototype.reset;
-mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var O=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){O.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(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function q(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}
-function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function F(){mxActor.call(this)}function D(){mxActor.call(this)}function E(){mxActor.call(this)}function K(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function p(){mxActor.call(this)}function q(){mxCylinder.call(this)}
+function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function E(){mxActor.call(this)}function K(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function J(){mxRectangleShape.call(this)}
-function A(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function Q(){mxCylinder.call(this)}function ga(){mxShape.call(this)}function G(){mxShape.call(this)}function C(){mxEllipse.call(this)}function B(){mxShape.call(this)}function U(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function V(){mxShape.call(this)}function qa(){mxShape.call(this)}
-function ma(){mxShape.call(this)}function ja(){mxShape.call(this)}function na(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function ka(){mxRectangleShape.call(this)}function la(){mxDoubleEllipse.call(this)}function ca(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function Z(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function ta(){mxActor.call(this)}
-function S(){mxActor.call(this)}function ea(){mxActor.call(this)}function ha(){mxActor.call(this)}function O(){mxActor.call(this)}function aa(){mxActor.call(this)}function ra(){mxActor.call(this)}function ua(){mxActor.call(this)}function oa(){mxActor.call(this)}function xa(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ha(){mxRhombus.call(this)}function Ia(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}
-function Ja(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function Ea(){mxActor.call(this)}function za(){mxActor.call(this)}function X(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)}function Na(b,d,f,c,e,g,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
-e-l,z.y-g-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
+function B(){mxActor.call(this)}function M(){mxActor.call(this)}function P(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function F(){mxShape.call(this)}function I(){mxEllipse.call(this)}function A(){mxShape.call(this)}function S(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function X(){mxShape.call(this)}function ca(){mxShape.call(this)}function ma(){mxShape.call(this)}
+function fa(){mxShape.call(this)}function na(){mxShape.call(this)}function ka(){mxCylinder.call(this)}function oa(){mxCylinder.call(this)}function Z(){mxRectangleShape.call(this)}function la(){mxDoubleEllipse.call(this)}function aa(){mxDoubleEllipse.call(this)}function T(){mxArrowConnector.call(this);this.spacing=0}function ra(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function wa(){mxActor.call(this)}
+function U(){mxActor.call(this)}function ea(){mxActor.call(this)}function ha(){mxActor.call(this)}function ja(){mxActor.call(this)}function O(){mxActor.call(this)}function Y(){mxActor.call(this)}function xa(){mxActor.call(this)}function ua(){mxActor.call(this)}function sa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function Ba(){mxRhombus.call(this)}function Ca(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}
+function Ja(){mxEllipse.call(this)}function za(){mxActor.call(this)}function Ga(){mxActor.call(this)}function Aa(){mxActor.call(this)}function W(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function ya(){mxConnector.call(this)}function Na(b,d,f,c,e,g,l,k,m,p){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
+e-l,z.y-g-l,2*l,2*l);p?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=g,g=l;b.rotate(-this.getShapeRotation(),z,g,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,g=z.getActualStartSize(this.state.cell),
-l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),pa="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),sa=[{y:null!=m?m.y+m.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),q={y:0,cells:z.model.getChildCells(l[k],!0)};sa.push(q);null!=m&&(q.y=m.y+m.height,b.begin(),b.moveTo(d+g.x,f+m.y),b.lineTo(d+c-g.width,f+m.y),b.end(),b.stroke())}if(pa)for(c=
-z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(pa=l=0;pa<sa.length;pa++)q=sa[pa],null!=q&&(z.model.isVisible(q.cells[k])?l=q.y:(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+q.y),l=0));b.lineTo(d+m.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),qa="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),ta=[{y:null!=m?m.y+m.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),p={y:0,cells:z.model.getChildCells(l[k],!0)};ta.push(p);null!=m&&(p.y=m.y+m.height,b.begin(),b.moveTo(d+g.x,f+m.y),b.lineTo(d+c-g.width,f+m.y),b.end(),b.stroke())}if(qa)for(c=
+z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(qa=l=0;qa<ta.length;qa++)p=ta[qa],null!=p&&(z.model.isVisible(p.cells[k])?l=p.y:(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+p.y),l=0));b.lineTo(d+m.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),
0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
-"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Ka=Math.tan(mxUtils.toRadians(30)),Ga=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
-f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Ka);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ga);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ga)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
-function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Ka));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ga)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ga)*d),b.lineTo(.5*d,(1-Ga)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ga),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ga)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
+"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Ka=Math.tan(mxUtils.toRadians(30)),Ia=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
+f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Ka);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ia);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ia)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
+function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Ka));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ia)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ia)*d),b.lineTo(.5*d,(1-Ia)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ia),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ia)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,
"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);
b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,
-z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(q,mxCylinder);q.prototype.size=15;q.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
-(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",q);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
-2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.arcSize=.1;p.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
+(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
+2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",p);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,k);d=Math.min(c-k,d);g||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,
-0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",p);p.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
+0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==
mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);g||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,
@@ -2715,13 +2716,13 @@ null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("u
d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=
-mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
-"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};p.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
-"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(F,mxActor);F.prototype.size=.2;F.prototype.fixedSize=20;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=
-function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",F);mxUtils.extend(D,
-mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
-0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",D);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,
+"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
+function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",D);mxUtils.extend(C,
+mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
+0),new mxPoint(c-d,0),new mxPoint(c,e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",C);mxUtils.extend(E,mxActor);E.prototype.size=.5;E.prototype.redrawPath=function(b,d,f,c,e){b.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,e/2),new mxPoint(0,e/2),new mxPoint(d,e/2),new mxPoint(d,
e),new mxPoint(c,e)],this.isRounded,f,!1);b.end()};mxCellRenderer.registerShape("curlyBracket",E);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(b,d,f,c,e){b.setStrokeWidth(1);b.setFillColor(this.stroke);d=c/5;b.rect(0,0,d,e);b.fillAndStroke();b.rect(2*d,0,d,e);b.fillAndStroke();b.rect(4*d,0,d,e);b.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",K);L.prototype.moveTo=function(b,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;this.firstX=b;this.firstY=
d};L.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)};L.prototype.quadTo=function(b,d,f,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=c};L.prototype.curveTo=function(b,d,f,c,e,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};L.prototype.arcTo=function(b,d,f,c,e,g,l){this.originalArcTo.apply(this.canvas,
arguments);this.lastX=g;this.lastY=l};L.prototype.lineTo=function(b,d){if(null!=this.lastX&&null!=this.lastY){var f=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN},c=Math.abs(b-this.lastX),e=Math.abs(d-this.lastY),z=Math.sqrt(c*c+e*e);if(2>z){this.originalLineTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d;return}var g=Math.round(z/10),l=this.defaultVariation;5>g&&(g=5,l/=3);for(var k=f(b-this.lastX)*c/g,f=f(d-this.lastY)*e/g,c=c/z,e=e/z,z=0;z<g;z++){var m=(Math.random()-
@@ -2733,128 +2734,128 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this
mxRectangleShape);H.prototype.size=.1;H.prototype.fixedSize=!1;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=b.width,f=b.height;b=new mxRectangle(b.x,b.y,d,f);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=
mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*e,f*e));b.x+=Math.round(c);b.width-=Math.round(2*c)}return b};H.prototype.paintForeground=function(b,d,f,c,e){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=z?Math.max(0,Math.min(c,g)):c*Math.max(0,Math.min(1,g));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
100,g=Math.max(g,Math.min(c*z,e*z)));g=Math.round(g);b.begin();b.moveTo(d+g,f);b.lineTo(d+g,f+e);b.moveTo(d+c-g,f);b.lineTo(d+c-g,f+e);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",H);mxCellRenderer.registerShape("process2",H);mxUtils.extend(J,mxRectangleShape);J.prototype.paintBackground=function(b,d,f,c,e){b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};J.prototype.paintForeground=function(b,d,f,c,e){};mxCellRenderer.registerShape("transparent",
-J);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+J);mxUtils.extend(B,mxHexagon);B.prototype.size=30;B.prototype.position=.5;B.prototype.position2=.5;B.prototype.base=20;B.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(b,d,f,c,e){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
this.size))));var z=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-f),new mxPoint(Math.min(c,z+l),e-f),new mxPoint(g,e),new mxPoint(Math.max(0,z),e-f),new mxPoint(0,e-f)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",
-A);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,
+B);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,
0),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(0,e),new mxPoint(d,e/2)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("step",M);mxUtils.extend(P,mxHexagon);P.prototype.size=.25;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var g=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+g);b.lineTo(d+c/2,
-f+e-g);b.moveTo(d+g,f+e/2);b.lineTo(d+c-g,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
+"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",P);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(b,d,f,c,e){var g=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+g);b.lineTo(d+c/2,
+f+e-g);b.moveTo(d+g,f+e/2);b.lineTo(d+c-g,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",V);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var g=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=z){var l=this.style["symbol"+g+"Align"],
-k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],q=this.style["symbol"+g+"Height"],p=this.style["symbol"+g+"Spacing"]||0,G=this.style["symbol"+g+"VSpacing"]||p,pa=this.style["symbol"+g+"ArcSpacing"];null!=pa&&(pa*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),p+=pa,G+=pa);var pa=d,sa=f,pa=l==mxConstants.ALIGN_CENTER?pa+(c-m)/2:l==mxConstants.ALIGN_RIGHT?pa+(c-m-p):pa+p,sa=k==mxConstants.ALIGN_MIDDLE?sa+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?sa+(e-q-G):sa+G;b.save();
-l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,pa,sa,m,q);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(Q,mxCylinder);Q.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",Q);mxUtils.extend(ga,mxShape);ga.prototype.paintBackground=
-function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",ga);mxUtils.extend(G,mxShape);G.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};G.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
-b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",G);mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",C);mxUtils.extend(B,mxShape);B.prototype.paintVertexShape=
-function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",B);mxUtils.extend(U,mxShape);U.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};U.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};U.prototype.paintForeground=
-function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(I,mxRectangleShape);I.prototype.size=40;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};I.prototype.paintBackground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,g):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=I&&(z=new z,z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,g),b.restore()));g<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+g),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};I.prototype.paintForeground=
-function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",I);mxUtils.extend(ba,mxShape);ba.prototype.width=60;ba.prototype.height=30;ba.prototype.corner=10;ba.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};ba.prototype.paintBackground=function(b,d,f,c,e){var g=this.corner,z=Math.min(c,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,l-1.5*g));b.lineTo(d+Math.max(0,z-g),f+l);b.lineTo(d,f+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",ba);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),
-b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=I.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
+k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],p=this.style["symbol"+g+"Height"],q=this.style["symbol"+g+"Spacing"]||0,F=this.style["symbol"+g+"VSpacing"]||q,qa=this.style["symbol"+g+"ArcSpacing"];null!=qa&&(qa*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),q+=qa,F+=qa);var qa=d,ta=f,qa=l==mxConstants.ALIGN_CENTER?qa+(c-m)/2:l==mxConstants.ALIGN_RIGHT?qa+(c-m-q):qa+q,ta=k==mxConstants.ALIGN_MIDDLE?ta+(e-p)/2:k==mxConstants.ALIGN_BOTTOM?ta+(e-p-F):ta+F;b.save();
+l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,qa,ta,m,p);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
+function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};F.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
+b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",F);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",I);mxUtils.extend(A,mxShape);A.prototype.paintVertexShape=
+function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",A);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};S.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};S.prototype.paintForeground=
+function(b,d,f,c,e){b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,e/4);b.end();b.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(b.x,b.y,b.width,d)};G.prototype.paintBackground=function(b,d,f,c,e){var g=Math.max(0,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),z=mxUtils.getValue(this.style,"participant");null==z||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,b,d,f,c,g):(z=this.state.view.graph.cellRenderer.getShape(z),null!=z&&z!=G&&(z=new z,z.apply(this.state),b.save(),z.paintVertexShape(b,d,f,c,g),b.restore()));g<e&&(b.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),b.begin(),b.moveTo(d+c/2,f+g),b.lineTo(d+c/2,f+e),b.end(),b.stroke())};G.prototype.paintForeground=
+function(b,d,f,c,e){var g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,b,d,f,c,Math.min(e,g))};mxCellRenderer.registerShape("umlLifeline",G);mxUtils.extend(X,mxShape);X.prototype.width=60;X.prototype.height=30;X.prototype.corner=10;X.prototype.getLabelMargins=function(b){return new mxRectangle(0,0,b.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),b.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};X.prototype.paintBackground=function(b,d,f,c,e){var g=this.corner,z=Math.min(c,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(e,Math.max(1.5*g,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(b.setFillColor(k),b.rect(d,f,c,e),b.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(b,d,f,c,e),b.setGradient(this.fill,this.gradient,d,f,c,e,this.gradientDirection)):b.setFillColor(this.fill);b.begin();b.moveTo(d,f);b.lineTo(d+z,f);b.lineTo(d+z,f+Math.max(0,l-1.5*g));b.lineTo(d+Math.max(0,z-g),f+l);b.lineTo(d,f+l);b.close();b.fillAndStroke();b.begin();b.moveTo(d+z,f);b.lineTo(d+c,f);b.lineTo(d+c,f+e);b.lineTo(d,f+e);b.lineTo(d,f+l);b.stroke()};mxCellRenderer.registerShape("umlFrame",X);mxPerimeter.CenterPerimeter=function(b,d,f,c){return new mxPoint(b.getCenterX(),
+b.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(b,d,f,c){c=G.prototype.size;null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;f.x<b.getCenterX()&&(d=-1*(d+1));return new mxPoint(b.getCenterX()+d,Math.min(b.y+b.height,Math.max(b.y+c,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
function(b,d,f,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(b,d,f,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return f.x<b.getCenterX()&&(c=-1*(c+1)),
-new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",A.prototype.size))*d.view.scale))),d.style),
-d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?F.prototype.fixedSize:F.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?
+new mxPoint(b.getCenterX()+c,Math.min(b.y+b.height,Math.max(b.y,f.y)));f.y<b.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(b.x+b.width,Math.max(b.x,f.x)),b.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(b,d,f,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(b,new mxRectangle(0,0,0,Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(d.style,"size",B.prototype.size))*d.view.scale))),d.style),
+d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?D.prototype.fixedSize:D.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?
(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("parallelogramPerimeter",
-mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?D.prototype.fixedSize:D.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
+mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):
m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,
-"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
-g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(q,z+
-e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
-m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
-e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);b.fillAndStroke();
-b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",V);mxUtils.extend(qa,mxShape);qa.prototype.size=10;qa.prototype.inset=2;qa.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-g)/2-l,g+
-l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",qa);mxUtils.extend(ma,mxShape);ma.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ma);mxUtils.extend(ja,mxShape);ja.prototype.inset=2;ja.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
-this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ja);mxUtils.extend(na,mxCylinder);na.prototype.jettyWidth=20;na.prototype.jettyHeight=10;na.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
-f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",na);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;
-Y.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=.3*e-d/2,k=.7*e-d/2;g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,
-z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintForeground=function(b,d,f,c,e){var g=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+g,f),new mxPoint(d+c,f+l),new mxPoint(d+g,f+e),new mxPoint(d,f+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
-ka);mxUtils.extend(la,mxDoubleEllipse);la.prototype.outerStroke=!0;la.prototype.paintVertexShape=function(b,d,f,c,e){var g=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+g,f+g,c-2*g,e-2*g),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",la);mxUtils.extend(ca,la);ca.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ca);mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=4;R.prototype.isOpenEnded=
-function(){return!0};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};R.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",R);mxUtils.extend(Z,mxArrowConnector);Z.prototype.defaultWidth=10;Z.prototype.defaultArrowWidth=20;Z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Z.prototype.getEndArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Z);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",W);mxUtils.extend(da,mxRectangleShape);da.prototype.dx=20;da.prototype.dy=20;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var l=mxUtils.getValue(this.style,
+"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(p,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(p,z+
+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?P.prototype.fixedSize:P.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
+m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(p,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);
+b.fillAndStroke();b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.inset=2;ma.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-
+g)/2-l,g+l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",ma);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",fa);mxUtils.extend(na,mxShape);na.prototype.inset=2;na.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
+this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",na);mxUtils.extend(ka,mxCylinder);ka.prototype.jettyWidth=20;ka.prototype.jettyHeight=10;ka.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
+f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("module",ka);mxUtils.extend(oa,mxCylinder);oa.prototype.jettyWidth=32;oa.prototype.jettyHeight=
+12;oa.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=l/2;var l=f+l/2,z=.3*e-d/2,k=.7*e-d/2;g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,k),b.lineTo(l,k),b.lineTo(l,k+d),b.lineTo(f,k+d)):(b.moveTo(f,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(f,e),b.lineTo(f,k+d),b.lineTo(0,k+d),b.lineTo(0,k),b.lineTo(f,k),b.lineTo(f,z+d),b.lineTo(0,
+z+d),b.lineTo(0,z),b.lineTo(f,z),b.close());b.end()};mxCellRenderer.registerShape("component",oa);mxUtils.extend(Z,mxRectangleShape);Z.prototype.paintForeground=function(b,d,f,c,e){var g=c/2,l=e/2,z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b.begin();this.addPoints(b,[new mxPoint(d+g,f),new mxPoint(d+c,f+l),new mxPoint(d+g,f+e),new mxPoint(d,f+l)],this.isRounded,z,!0);b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
+Z);mxUtils.extend(la,mxDoubleEllipse);la.prototype.outerStroke=!0;la.prototype.paintVertexShape=function(b,d,f,c,e){var g=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(d+g,f+g,c-2*g,e-2*g),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(d,f,c,e),b.stroke())};mxCellRenderer.registerShape("endState",la);mxUtils.extend(aa,la);aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",aa);mxUtils.extend(T,mxArrowConnector);T.prototype.defaultWidth=4;T.prototype.isOpenEnded=
+function(){return!0};T.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};T.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",T);mxUtils.extend(ra,mxArrowConnector);ra.prototype.defaultWidth=10;ra.prototype.defaultArrowWidth=20;ra.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ra.prototype.getEndArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ra.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ra);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("manualInput",Q);mxUtils.extend(da,mxRectangleShape);da.prototype.dx=20;da.prototype.dy=20;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(b,d,f,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var l=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(c*l,e*l));l=Math.max(g,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(d,f+g);b.lineTo(d+c,f+g);b.end();b.stroke();b.begin();b.moveTo(d+l,f);b.lineTo(d+l,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("internalStorage",da);mxUtils.extend(ia,mxActor);ia.prototype.dx=20;ia.prototype.dy=
20;ia.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(d,f),new mxPoint(d,e),new mxPoint(0,e)],this.isRounded,g,!0);b.end()};
-mxCellRenderer.registerShape("corner",ia);mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",ta);mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=20;S.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("tee",S);mxUtils.extend(ea,mxActor);ea.prototype.arrowWidth=.3;ea.prototype.arrowSize=.2;ea.prototype.redrawPath=
+mxCellRenderer.registerShape("corner",ia);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.lineTo(0,e);b.end();b.moveTo(c,0);b.lineTo(c,e);b.end();b.moveTo(0,e/2);b.lineTo(c,e/2);b.end()};mxCellRenderer.registerShape("crossbar",wa);mxUtils.extend(U,mxActor);U.prototype.dx=20;U.prototype.dy=20;U.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint((c+d)/2,f),new mxPoint((c+d)/2,e),new mxPoint((c-d)/2,e),new mxPoint((c-d)/2,f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.registerShape("tee",U);mxUtils.extend(ea,mxActor);ea.prototype.arrowWidth=.3;ea.prototype.arrowSize=.2;ea.prototype.redrawPath=
function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(e-g)/2;var g=f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,f),new mxPoint(c-d,f),new mxPoint(c-d,0),new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(0,g)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("singleArrow",
ea);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(b,d,f,c,e){var g=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ea.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ea.prototype.arrowSize))));f=(e-g)/2;var g=f+g,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e/2),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(c-d,f),new mxPoint(c-d,0),
-new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(d,g),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",aa);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",
-ra);mxUtils.extend(ua,mxActor);ua.prototype.size=20;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",
-ua);mxUtils.extend(oa,mxActor);oa.prototype.size=.375;oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",
-oa);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",xa);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);
-b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",Aa);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",va);mxUtils.extend(Ha,mxRhombus);Ha.prototype.paintVertexShape=
-function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",Ha);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",
-Ia);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){var g=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,g);b.lineTo(d+10,g-5);b.moveTo(d,g);b.lineTo(d+10,g+5);b.moveTo(d,g);b.lineTo(d+c,g);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,g);b.lineTo(d+c-10,g-5);b.moveTo(d+c,g);b.lineTo(d+c-10,g+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);
+new mxPoint(c,e/2),new mxPoint(c-d,e),new mxPoint(c-d,g),new mxPoint(d,g),new mxPoint(d,e)],this.isRounded,l,!0);b.end()};mxCellRenderer.registerShape("doubleArrow",ha);mxUtils.extend(ja,mxActor);ja.prototype.size=.1;ja.prototype.fixedSize=20;ja.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+b.moveTo(d,0);b.lineTo(c,0);b.quadTo(c-2*d,e/2,c,e);b.lineTo(d,e);b.quadTo(d-2*d,e/2,d,0);b.close();b.end()};mxCellRenderer.registerShape("dataStorage",ja);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.registerShape("xor",
+Y);mxUtils.extend(xa,mxActor);xa.prototype.size=20;xa.prototype.isRoundable=function(){return!0};xa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,.8*d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("loopLimit",
+xa);mxUtils.extend(ua,mxActor);ua.prototype.size=.375;ua.prototype.isRoundable=function(){return!0};ua.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,e-d),new mxPoint(c/2,e),new mxPoint(0,e-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("offPageConnector",
+ua);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/2,f+e);b.lineTo(d+c,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("tapeData",sa);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke();b.begin();b.moveTo(d+c/2,f);
+b.lineTo(d+c/2,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d+.145*c,f+.145*e);b.lineTo(d+.855*c,f+.855*e);b.end();b.stroke();b.begin();b.moveTo(d+.855*c,f+.145*e);b.lineTo(d+.145*c,f+.855*e);b.end();b.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(Ba,mxRhombus);Ba.prototype.paintVertexShape=
+function(b,d,f,c,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();b.moveTo(d,f+e/2);b.lineTo(d+c,f+e/2);b.end();b.stroke()};mxCellRenderer.registerShape("sortShape",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(b,d,f,c,e){b.begin();b.moveTo(d,f);b.lineTo(d+c,f);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke();b.begin();b.moveTo(d,f+e);b.lineTo(d+c,f+e);b.lineTo(d+c/2,f+e/2);b.close();b.fillAndStroke()};mxCellRenderer.registerShape("collate",
+Ca);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(b,d,f,c,e){var g=f+e-5;b.begin();b.moveTo(d,f);b.lineTo(d,f+e);b.moveTo(d,g);b.lineTo(d+10,g-5);b.moveTo(d,g);b.lineTo(d+10,g+5);b.moveTo(d,g);b.lineTo(d+c,g);b.moveTo(d+c,f);b.lineTo(d+c,f+e);b.moveTo(d+c,g);b.lineTo(d+c-10,g-5);b.moveTo(d+c,g);b.lineTo(d+c-10,g+5);b.end();b.stroke()};mxCellRenderer.registerShape("dimension",Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(b,d,f,c,e){this.outline||b.setStrokeColor(null);
if(null!=this.style){var g=b.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(b.pointerEvents=!1);b.rect(d,f,c,e);b.fill();b.pointerEvents=g;b.setStrokeColor(this.stroke);b.begin();b.moveTo(d,f);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?b.lineTo(d+c,f):b.moveTo(d+c,f);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?b.lineTo(d+c,f+e):b.moveTo(d+c,f+e);this.outline||"1"==mxUtils.getValue(this.style,
-"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};
-mxCellRenderer.registerShape("lineEllipse",Ja);mxUtils.extend(ya,mxActor);ya.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",ya);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.2;Ea.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-g)/2;f=d+g;var l=(c-
-g)/2,g=l+g;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(g,0);b.lineTo(g,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(g,f);b.lineTo(g,e);b.lineTo(l,e);b.lineTo(l,f);b.lineTo(0,f);b.close();b.end()};mxCellRenderer.registerShape("cross",Ea);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/
-2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",za);mxUtils.extend(X,mxActor);X.prototype.cst={RECT2:"mxgraph.basic.rect"};X.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",
+"bottom","1")?b.lineTo(d,f+e):b.moveTo(d,f+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&b.lineTo(d,f);b.end();b.stroke()}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.setShadow(!1);b.begin();"vertical"==mxUtils.getValue(this.style,"line")?(b.moveTo(d+c/2,f),b.lineTo(d+c/2,f+e)):(b.moveTo(d,f+e/2),b.lineTo(d+c,f+e/2));b.end();b.stroke()};
+mxCellRenderer.registerShape("lineEllipse",Ja);mxUtils.extend(za,mxActor);za.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);b.moveTo(0,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c-d,e);b.lineTo(0,e);b.close();b.end()};mxCellRenderer.registerShape("delay",za);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.2;Ga.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(e,c);var g=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=(e-g)/2;f=d+g;var l=(c-
+g)/2,g=l+g;b.moveTo(0,d);b.lineTo(l,d);b.lineTo(l,0);b.lineTo(g,0);b.lineTo(g,d);b.lineTo(c,d);b.lineTo(c,f);b.lineTo(g,f);b.lineTo(g,e);b.lineTo(l,e);b.lineTo(l,f);b.lineTo(0,f);b.close();b.end()};mxCellRenderer.registerShape("cross",Ga);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.25;Aa.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/2);f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);b.moveTo(0,e/2);b.lineTo(f,0);b.lineTo(c-d,0);b.quadTo(c,0,c,e/
+2);b.quadTo(c,e,c-d,e);b.lineTo(f,e);b.close();b.end()};mxCellRenderer.registerShape("display",Aa);mxUtils.extend(W,mxActor);W.prototype.cst={RECT2:"mxgraph.basic.rect"};W.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"}]}];X.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};X.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=g&&g.rectOutline?g.rectOutline:
-mxUtils.getValue(this.style,"rectOutline",this.rectOutline),p=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),G=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,p)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),n=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),B=g&&g.bottom?g.bottom:
-mxUtils.getValue(this.style,"bottom",!0),C=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),y=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),I=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),D=g&&g.fillColor?g.fillColor:
-mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var V=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),U=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),A=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),sa=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),N=g&&g.opacity?g.opacity:
-mxUtils.getValue(this.style,"opacity","100"),pa=Math.max(0,Math.min(50,m));g=X.prototype;b.setDashed(z);G&&""!=G&&b.setDashPattern(G);b.setStrokeWidth(V);m=Math.min(.5*e,.5*c,m);k||(m=pa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(p=Math.min(v*Math.min(c,e)/100));p=Math.min(p,.5*Math.min(c,e)-m);(u||n||B||C)&&"frame"!=q&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,x,m,C):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),n&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,
-c,e,l,y,m,B),B&&g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),C&&g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(U),z=k=N,"none"==U&&(k=0),"none"==A&&(z=0),b.setGradient(U,A,0,0,c,e,sa,k,z),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C):b.moveTo(p,0),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),C&&B&&g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),B&&n&&g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,
-d,f,c,e,l,t,m,p,u,n),n&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),u&&C&&g.paintNWInner(b,d,f,c,e,l,x,m,p),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,d,f,c,e,l,x,t,y,I,m,u,n,B,C),b.stroke()));u||n||B||!C?u||n||!B||C?!u&&!n&&B&&C?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,
-d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):u||!n||B||C?!u&&n&&!B&&C?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==
-q&&(g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,
-l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):!u&&n&&B&&!C?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,
-d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):!u&&n&&B&&C?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,
-d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,
-d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):!u||n||B||C?u&&!n&&!B&&C?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke()):u&&!n&&B&&!C?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke(),b.begin(),
-g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):
-u&&!n&&B&&C?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,
-m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):u&&n&&!B&&!C?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,
-n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,
-c,e,l,x,m,p,C,u),b.close(),b.fillAndStroke()):u&&n&&!B&&C?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke()):u&&n&&B&&!C?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,
-C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,
-m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),b.close(),b.fillAndStroke()):u&&n&&B&&C&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,
-u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,
-e,l,I,m,p,B,C),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.paintSW(b,d,f,c,e,l,I,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintSWInner(b,d,f,c,e,l,I,m,p,B),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),g.paintSEInner(b,d,f,c,e,l,y,m,p),g.paintRightInner(b,d,f,c,
-e,l,t,m,p,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,p),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u),g.paintNWInner(b,d,f,c,e,l,x,m,p),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,e,l,x,m,p,C,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,C),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,p,n),g.paintTopInner(b,d,f,c,
-e,l,x,m,p,C,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,B),g.lineSEInner(b,d,f,c,e,l,y,m,p,B),g.paintRightInner(b,d,f,c,e,l,t,m,p,u,n),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),"double"==q&&
-(g.moveSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,C),g.lineSWInner(b,d,f,c,e,l,I,m,p,C),g.paintBottomInner(b,d,f,c,e,l,y,m,p,n,B),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,
-d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,p,u,C),g.paintLeftInner(b,d,f,c,e,l,I,m,p,B,C),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,x,t,y,I,m,u,n,B,C);b.stroke()};X.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};X.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};X.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
-"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};X.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):b.moveTo(m,e)};X.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};X.prototype.paintTop=
-function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};X.prototype.paintNE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};X.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==
-l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};X.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,0):b.lineTo(0,m)};X.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,
-e)};X.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};X.prototype.paintSW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};X.prototype.paintNWInner=function(b,d,f,
-c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};X.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(0,k):p&&!q?b.lineTo(k,0):p?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
-"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};X.prototype.paintNEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};X.prototype.paintRightInner=
-function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(c-k,0):p&&!q?b.lineTo(c,k):p?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};X.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,e):p&&!q?b.lineTo(0,e-k):p?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
-l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};X.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};X.prototype.paintBottomInner=function(b,d,f,c,
-e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(c,e-k):p&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!p?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};X.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,p){if(!p)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
-l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};X.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
-e-m-k):b.moveTo(0,e-k)};X.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};X.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
-g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};X.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
-k,e)};X.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g||p?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};X.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,p){p?"square"==l||"default"==l&&"square"==g||p?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
-l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};X.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.moveTo(k,0):p&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
-0)};X.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,p,q){p||q?!p&&q?b.lineTo(k,0):p&&!q?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};X.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,p,q,G,u,n,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==p)("fold"==l||"default"==
-l&&"fold"==g)&&G&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&G&&u&&(b.moveTo(c-q,0),b.lineTo(c-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==g)&&n&&u&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==p||"default"==p&&"fold"==g)&&n&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(X.prototype.cst.RECT2,X);X.prototype.constraints=null;mxUtils.extend(wa,mxConnector);wa.prototype.origPaintEdgeShape=wa.prototype.paintEdgeShape;
-wa.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,g=b.state.fixDash;wa.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),wa.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",wa);"undefined"!==typeof StyleFormatPanel&&function(){var b=
-StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),G=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),G=g*(l+k+1),u=c.x+q/2,n=c.y+G/2;c.x-=q;c.y-=G;return function(){b.begin();b.moveTo(u-q/2-G/2,n-G/2+q/2);b.lineTo(u-q/2+G/2,n-G/2-q/2);b.lineTo(u+G/2-3*q/2,n-3*G/2-q/2);b.lineTo(u-G/2-3*q/2,n-3*G/2+q/2);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),G=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-G/2,c.y-G/2+q/2);b.lineTo(c.x+G/2-3*q/2,c.y-3*G/2-q/2);b.moveTo(c.x-q/2+G/2,c.y-
-G/2-q/2);b.lineTo(c.x-G/2-3*q/2,c.y-3*G/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Na);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,p){var q=c.clone(),G=Na.apply(this,arguments),u=e*(l+2*k),n=g*(l+2*k);return function(){G.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-g*k);b.lineTo(q.x-2*u+e*k,q.y-2*n+g*k);b.moveTo(q.x-u-n+g*k,q.y-n+u-e*k);b.lineTo(q.x+n-u-g*k,q.y-n-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),G=g*(l+
-k+1),u=c.clone();c.x-=p;c.y-=G;return function(){b.begin();b.moveTo(u.x-G,u.y+p);b.quadTo(c.x-G,c.y+p,c.x,c.y);b.quadTo(c.x+G,c.y-p,u.x+G,u.y-p);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,p){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var q=c.clone();q.x-=d;q.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(q.x,q.y);m?b.lineTo(q.x-e-g/2,q.y-g+e/2):b.lineTo(q.x+g/2-e,q.y-g-e/2);b.lineTo(q.x-e,q.y-g);b.close();p?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
-function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,q,p){g*=m+q;l*=m+q;var G=e.clone();return function(){d.begin();d.moveTo(G.x,G.y);k?d.lineTo(G.x-g-l/b,G.y-l+g/b):d.lineTo(G.x+l/b-g,G.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Ma(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
-Math.round(2*d)/b.view.scale-f})},Ma=function(b,d,f,c,e){return fa(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,q=Math.sqrt(g*g+k*k),m=c.call(this,q,g/q,k/q,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,q=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-q.x,p=l.y-q.y,G=Math.sqrt(m*m+p*p);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
-G,m/G,p/G,q,l,c,g)})},Fa=function(b){return function(d){return[fa(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ea.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ea.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[fa(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Sa=function(b,d,f){return function(c){var e=[fa(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
-c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ba(c));return e}},Oa=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[fa(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
-c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Ba(g));return l}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[fa(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,g*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Ba(c));return e}},La=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d}},Ba=function(b,d){return fa(b,
+dispName:"Fold"}]}];W.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};W.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),p=g&&g.rectOutline?g.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),q=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),F=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,q)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),n=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),A=g&&g.bottom?g.bottom:
+mxUtils.getValue(this.style,"bottom",!0),x=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),I=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),G=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),B=g&&g.fillColor?g.fillColor:
+mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var C=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),S=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),ta=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),N=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),ca=g&&g.opacity?g.opacity:
+mxUtils.getValue(this.style,"opacity","100"),qa=Math.max(0,Math.min(50,m));g=W.prototype;b.setDashed(z);F&&""!=F&&b.setDashPattern(F);b.setStrokeWidth(C);m=Math.min(.5*e,.5*c,m);k||(m=qa*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(q=Math.min(v*Math.min(c,e)/100));q=Math.min(q,.5*Math.min(c,e)-m);(u||n||A||x)&&"frame"!=p&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,I,m,x):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),n&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,
+c,e,l,G,m,A),A&&g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),x&&g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(S),z=k=ca,"none"==S&&(k=0),"none"==ta&&(z=0),b.setGradient(S,ta,0,0,c,e,N,k,z),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x):b.moveTo(q,0),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),x&&A&&g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),A&&n&&g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,
+d,f,c,e,l,t,m,q,u,n),n&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),u&&x&&g.paintNWInner(b,d,f,c,e,l,I,m,q),b.fill(),"none"==B&&(b.begin(),g.paintFolds(b,d,f,c,e,l,I,t,G,y,m,u,n,A,x),b.stroke()));u||n||A||!x?u||n||!A||x?!u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,
+d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):u||!n||A||x?!u&&n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==
+p&&(g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,
+l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,
+d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==p&&(g.moveNWInner(b,
+d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,
+d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u||n||A||x?u&&!n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke()):u&&!n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke(),b.begin(),
+g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):
+u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,G,
+m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):u&&n&&!A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,
+n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,
+c,e,l,I,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke()):u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,
+x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,
+m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&A&&x&&("frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,
+u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),b.close(),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,
+e,l,y,m,q,A,x),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.paintSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintSWInner(b,d,f,c,e,l,y,m,q,A),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,G,m,q),g.paintRightInner(b,d,f,c,
+e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,I,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke())):"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,I,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,I,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,
+e,l,I,m,q,x,u),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,G,m,A),g.lineSEInner(b,d,f,c,e,l,G,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==p&&
+(g.moveSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,G,m,n),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,q,x),g.paintBottomInner(b,d,f,c,e,l,G,m,q,n,A),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,I,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,
+d,f,c,e,l,I,m,u),g.lineNWInner(b,d,f,c,e,l,I,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,q,A,x),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,I,t,G,y,m,u,n,A,x);b.stroke()};W.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};W.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};W.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
+"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};W.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):b.moveTo(m,e)};W.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};W.prototype.paintTop=
+function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};W.prototype.paintNE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};W.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==
+l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};W.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,0):b.lineTo(0,m)};W.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,
+e)};W.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};W.prototype.paintSW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};W.prototype.paintNWInner=function(b,d,f,
+c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};W.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(0,k):q&&!p?b.lineTo(k,0):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
+"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};W.prototype.paintNEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};W.prototype.paintRightInner=
+function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c-k,0):q&&!p?b.lineTo(c,k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};W.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,e):q&&!p?b.lineTo(0,e-k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};W.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};W.prototype.paintBottomInner=function(b,d,f,c,
+e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c,e-k):q&&!p?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!q?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};W.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,q){if(!q)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
+l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};W.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
+e-m-k):b.moveTo(0,e-k)};W.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};W.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};W.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
+k,e)};W.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};W.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};W.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.moveTo(k,0):q&&!p?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
+0)};W.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,0):q&&!p?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};W.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,q,p,F,u,n,A){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==q)("fold"==l||"default"==
+l&&"fold"==g)&&F&&A&&(b.moveTo(0,p),b.lineTo(p,p),b.lineTo(p,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&u&&(b.moveTo(c-p,0),b.lineTo(c-p,p),b.lineTo(c,p)),("fold"==k||"default"==k&&"fold"==g)&&n&&u&&(b.moveTo(c-p,e),b.lineTo(c-p,e-p),b.lineTo(c,e-p)),("fold"==q||"default"==q&&"fold"==g)&&n&&A&&(b.moveTo(0,e-p),b.lineTo(p,e-p),b.lineTo(p,e))};mxCellRenderer.registerShape(W.prototype.cst.RECT2,W);W.prototype.constraints=null;mxUtils.extend(ya,mxConnector);ya.prototype.origPaintEdgeShape=ya.prototype.paintEdgeShape;
+ya.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,g=b.state.fixDash;ya.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),ya.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",ya);"undefined"!==typeof StyleFormatPanel&&function(){var b=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/2-p/2);b.stroke()}});mxMarker.addMarker("box",
+function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),F=g*(l+k+1),u=c.x+p/2,n=c.y+F/2;c.x-=p;c.y-=F;return function(){b.begin();b.moveTo(u-p/2-F/2,n-F/2+p/2);b.lineTo(u-p/2+F/2,n-F/2-p/2);b.lineTo(u+F/2-3*p/2,n-3*F/2-p/2);b.lineTo(u-F/2-3*p/2,n-3*F/2+p/2);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/2-p/2);b.moveTo(c.x-p/2+F/2,c.y-
+F/2-p/2);b.lineTo(c.x-F/2-3*p/2,c.y-3*F/2+p/2);b.stroke()}});mxMarker.addMarker("circle",Na);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var p=c.clone(),F=Na.apply(this,arguments),u=e*(l+2*k),n=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(p.x-e*k,p.y-g*k);b.lineTo(p.x-2*u+e*k,p.y-2*n+g*k);b.moveTo(p.x-u-n+g*k,p.y-n+u-e*k);b.lineTo(p.x+n-u-g*k,p.y-n-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),F=g*(l+
+k+1),u=c.clone();c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(u.x-F,u.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,c.y-q,u.x+F,u.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,q){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var p=c.clone();p.x-=d;p.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(p.x,p.y);m?b.lineTo(p.x-e-g/2,p.y-g+e/2):b.lineTo(p.x+g/2-e,p.y-g-e/2);b.lineTo(p.x-e,p.y-g);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
+function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,p,q){g*=m+p;l*=m+p;var F=e.clone();return function(){d.begin();d.moveTo(F.x,F.y);k?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Ma(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
+Math.round(2*d)/b.view.scale-f})},Ma=function(b,d,f,c,e){return ga(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,p=Math.sqrt(g*g+k*k),m=c.call(this,p,g/p,k/p,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,p=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-p.x,q=l.y-p.y,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
+F,m/F,q/F,p,l,c,g)})},Ha=function(b){return function(d){return[ga(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ea.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ea.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
+Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ga(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Sa=function(b,d,f){return function(c){var e=[ga(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
+c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},Oa=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ga(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
+c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Da(g));return l}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ga(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",e?f:d)));return new mxPoint(c.x+Math.min(.75*c.width*b,g*(e?.75:.75*c.width)),c.y+c.height/4)},function(d,c){var e=null!=f&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-d.x:Math.max(0,Math.min(b,(c.x-d.x)/d.width*.75));this.state.style.size=e},!1,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Da(c));return e}},La=function(){return function(b){var d=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d}},Da=function(b,d){return ga(b,
[mxConstants.STYLE_ARCSIZE],function(f){var c=null!=d?d:f.height/8;if("1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,e),f.y+c)}e=Math.max(0,parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*
-e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},fa=function(b,d,f,c,e,g,l){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);
+e),f.y+c)},function(d,f,c){"1"==mxUtils.getValue(b.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-f.x+d.x)/Math.min(d.width,d.height))))})},ga=function(b,d,f,c,e,g,l){var m=new mxHandle(b,null,mxVertexHandler.prototype.secondaryHandleImage);m.execute=function(b){for(var f=0;f<d.length;f++)this.copyStyle(d[f]);
l&&l(b)};m.getPosition=f;m.setPosition=c;m.ignoreGrid=null!=e?e:!0;if(g){var k=m.positionChanged;m.positionChanged=function(){k.apply(this,arguments);b.view.invalidate(this.state.cell);b.view.validate()}}return m},Pa={link:function(b){return[Ya(b,!0,10),Ya(b,!1,10)]},flexArrow:function(b){var d=b.view.graph.gridSize/b.view.scale,f=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Ma(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(d,f,c,e,g){d=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)+c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)-f*d/2)},function(f,c,e,g,l,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,m.x,m.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/
3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_STARTSIZE])-parseFloat(b.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE])})),f.push(Ma(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
@@ -2864,91 +2865,91 @@ parseFloat(b.style.endWidth))<d&&(b.style.startWidth=b.style.endWidth))})));mxUt
b.view.scale)+f*d/2)},function(f,c,e,g,l,m,k){f=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*f)/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<
d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE])})),f.push(Ma(b,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,f,c,e,g){d=(b.shape.getEndArrowWidth()-b.shape.strokewidth)*b.view.scale;g=3*mxUtils.getNumber(b.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+f*(g+b.shape.strokewidth*b.view.scale)-c*d/2,e.y+c*(g+b.shape.strokewidth*b.view.scale)+f*d/2)},function(f,c,e,g,l,m,k){f=
Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));c=mxUtils.ptLineDist(g.x,g.y,g.x+e,g.y-c,m.x,m.y);b.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.endWidth=Math.max(0,Math.round(2*f)-b.shape.getEdgeWidth())/b.view.scale;mxEvent.isControlDown(k.getEvent())&&(b.style[mxConstants.STYLE_STARTSIZE]=b.style[mxConstants.STYLE_ENDSIZE],b.style.startWidth=b.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(b.style[mxConstants.STYLE_ENDSIZE])-
-parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Ba(b,f/2))}d.push(fa(b,[mxConstants.STYLE_STARTSIZE],
+parseFloat(b.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(b.style.endWidth)-parseFloat(b.style.startWidth))<d&&(b.style.endWidth=b.style.startWidth))})));return f},swimlane:function(b){var d=[];if(mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(Da(b,f/2))}d.push(ga(b,[mxConstants.STYLE_STARTSIZE],
function(d){var f=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,f))):new mxPoint(d.x+Math.max(0,Math.min(d.width,f)),d.getCenterY())},function(d,f){b.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,f.y-d.y))):Math.round(Math.max(0,
Math.min(d.width,f.x-d.x)))},!1,null,function(d){if(mxEvent.isControlDown(d.getEvent())&&(d=b.view.graph,d.isTableRow(b.cell)||d.isTableCell(b.cell))){for(var f=d.getSwimlaneDirection(b.style),c=d.model.getParent(b.cell),c=d.model.getChildCells(c,!0),e=[],g=0;g<c.length;g++)c[g]!=b.cell&&d.isSwimlane(c[g])&&d.getSwimlaneDirection(d.getCurrentCellStyle(c[g]))==f&&e.push(c[g]);d.setCellStyles(mxConstants.STYLE_STARTSIZE,b.style[mxConstants.STYLE_STARTSIZE],e)}}));return d},label:La(),ext:La(),rectangle:La(),
-triangle:La(),rhombus:La(),umlLifeline:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[fa(b,["width","height"],function(b){var d=Math.max(ba.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",ba.prototype.width))),
-f=Math.max(1.5*ba.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",ba.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=Math.round(Math.max(ba.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*ba.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[fa(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,
-"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},cross:function(b){return[fa(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Ea.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[fa(b,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[fa(b,["size"],function(b){var d=
-Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},dataStorage:function(b){return[fa(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?O.prototype.fixedSize:
-O.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[fa(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-d)},function(b,d){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),fa(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));
-return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),fa(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(b.x+Math.min(b.width,
-f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},internalStorage:function(b){var d=[fa(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
-"dy",da.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Ba(b));return d},module:function(b){return[fa(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",na.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
-mxUtils.getValue(this.state.style,"jettyHeight",na.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[fa(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
-"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[fa(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
-d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Fa(1),doubleArrow:Fa(.5),folder:function(b){return[fa(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[fa(b,
-["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(q.prototype.size),offPageConnector:function(b){return[fa(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size))));
+triangle:La(),rhombus:La(),umlLifeline:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",G.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},umlFrame:function(b){return[ga(b,["width","height"],function(b){var d=Math.max(X.prototype.corner,Math.min(b.width,mxUtils.getValue(this.state.style,"width",X.prototype.width))),
+f=Math.max(1.5*X.prototype.corner,Math.min(b.height,mxUtils.getValue(this.state.style,"height",X.prototype.height)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.width=Math.round(Math.max(X.prototype.corner,Math.min(b.width,d.x-b.x)));this.state.style.height=Math.round(Math.max(1.5*X.prototype.corner,Math.min(b.height,d.y-b.y)))},!1)]},process:function(b){var d=[ga(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size));return d?new mxPoint(b.x+f,b.y+b.height/4):new mxPoint(b.x+b.width*f,b.y+b.height/4)},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*b.width,d.x-b.x)):Math.max(0,Math.min(.5,(d.x-b.x)/b.width));this.state.style.size=f},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},cross:function(b){return[ga(b,["size"],function(b){var d=Math.min(b.width,b.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ga.prototype.size)))*d/2;return new mxPoint(b.getCenterX()-d,b.getCenterY()-d)},function(b,d){var f=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,b.getCenterY()-d.y)/f*2,Math.max(0,b.getCenterX()-d.x)/f*2)))})]},note:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size)))));return new mxPoint(b.x+b.width-d,b.y+d)},function(b,d){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},note2:function(b){return[ga(b,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(b.x+b.width-f,b.y+f)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-d.x),Math.min(b.height,d.y-b.y))))})]},manualInput:function(b){var d=[ga(b,["size"],function(b){var d=
+Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*d/4)},function(b,d){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(d.y-b.y)/3)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},dataStorage:function(b){return[ga(b,["size"],function(b){var d="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",d?ja.prototype.fixedSize:
+ja.prototype.size));return new mxPoint(b.x+b.width-f*(d?1:b.width),b.getCenterY())},function(b,d){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(b.width,b.x+b.width-d.x)):Math.max(0,Math.min(1,(b.x+b.width-d.x)/b.width));this.state.style.size=f},!1)]},callout:function(b){var d=[ga(b,["size","position"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",B.prototype.position)));mxUtils.getValue(this.state.style,"base",B.prototype.base);return new mxPoint(b.x+f*b.width,b.y+b.height-d)},function(b,d){mxUtils.getValue(this.state.style,"base",B.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(b.height,b.y+b.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ga(b,["position2"],function(b){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",B.prototype.position2)));
+return new mxPoint(b.x+d*b.width,b.y+b.height)},function(b,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-b.x)/b.width)))/100},!1),ga(b,["base"],function(b){var d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"size",B.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position))),c=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"base",B.prototype.base)));return new mxPoint(b.x+Math.min(b.width,
+f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",B.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*b.width)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},internalStorage:function(b){var d=[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",da.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",da.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Da(b));return d},module:function(b){return[ga(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",ka.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
+mxUtils.getValue(this.state.style,"jettyHeight",ka.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
+"dy",ia.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",U.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",U.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
+d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ha(1),doubleArrow:Ha(.5),folder:function(b){return[ga(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ga(b,
+["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ua.prototype.size))));
return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,
-["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Oa(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Oa(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Oa(E.prototype.size,!1),display:Oa(za.prototype.size,!1),cube:Sa(1,
-c.prototype.size,!1),card:Sa(.5,v.prototype.size,!0),loopLimit:Sa(.5,ua.prototype.size,!0),trapezoid:Va(.5,D.prototype.size,D.prototype.fixedSize),parallelogram:Va(1,F.prototype.size,F.prototype.fixedSize)};Graph.createHandle=fa;Graph.handleFactory=Pa;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
+["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Oa(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Oa(P.prototype.size,!0,.5,!0,P.prototype.fixedSize),curlyBracket:Oa(E.prototype.size,!1),display:Oa(Aa.prototype.size,!1),cube:Sa(1,
+c.prototype.size,!1),card:Sa(.5,v.prototype.size,!0),loopLimit:Sa(.5,xa.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=ga;Graph.handleFactory=Pa;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(d=mxConstants.SHAPE_SWIMLANE);d=Pa[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Pa[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);
-b=Pa[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Qa=new mxPoint(1,0),Ra=new mxPoint(1,0),Fa=mxUtils.toRadians(-30),Qa=mxUtils.getRotatedPoint(Qa,Math.cos(Fa),Math.sin(Fa)),Fa=mxUtils.toRadians(-150),Ra=mxUtils.getRotatedPoint(Ra,Math.cos(Fa),Math.sin(Fa));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==
-m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Qa.x,q=Qa.y,p=Ra.x,G=Ra.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=n.x;var c=d-n.y;d=(G*b-p*c)/(k*G-q*p);b=(q*b-k*c)/(q*p-k*G);u?(f&&(n=new mxPoint(n.x+k*d,n.y+q*d),e.push(n)),n=new mxPoint(n.x+p*b,n.y+G*b)):(f&&(n=new mxPoint(n.x+p*b,n.y+G*b),e.push(n)),n=new mxPoint(n.x+k*d,n.y+q*d));e.push(n)};var n=m;null==
+b=Pa[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Qa=new mxPoint(1,0),Ra=new mxPoint(1,0),Ha=mxUtils.toRadians(-30),Qa=mxUtils.getRotatedPoint(Qa,Math.cos(Ha),Math.sin(Ha)),Ha=mxUtils.toRadians(-150),Ra=mxUtils.getRotatedPoint(Ra,Math.cos(Ha),Math.sin(Ha));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==
+m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Qa.x,p=Qa.y,q=Ra.x,F=Ra.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=n.x;var c=d-n.y;d=(F*b-q*c)/(k*F-p*q);b=(p*b-k*c)/(p*q-k*F);u?(f&&(n=new mxPoint(n.x+k*d,n.y+p*d),e.push(n)),n=new mxPoint(n.x+q*b,n.y+F*b)):(f&&(n=new mxPoint(n.x+q*b,n.y+F*b),e.push(n)),n=new mxPoint(n.x+k*d,n.y+p*d));e.push(n)};var n=m;null==
c&&(c=new mxPoint(m.x+(l.x-m.x)/2,m.y+(l.y-m.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-
c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));return b};A.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));return b};B.prototype.getConstraints=function(b,d,f){b=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-c)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};q.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};p.prototype.getConstraints=
+0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};q.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};da.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;Aa.prototype.constraints=mxEllipse.prototype.constraints;
-va.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};na.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,
-"jettyWidth",na.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",na.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));b.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return b};da.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;
+pa.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Aa.prototype.getConstraints=function(b,d,f){b=[];var c=Math.min(d,f/2),e=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};ka.prototype.getConstraints=function(b,d,f){d=parseFloat(mxUtils.getValue(b,
+"jettyWidth",ka.prototype.jettyWidth))/2;b=parseFloat(mxUtils.getValue(b,"jettyHeight",ka.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,1.5*b)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*b,3.5*b))];f>5*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));f>8*b&&c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,d));f>15*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};ua.prototype.constraints=mxRectangleShape.prototype.constraints;oa.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)];ga.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)];Y.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,
+.5),!1,null,d));f>15*b&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};xa.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];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)];oa.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)];m.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,
+.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)];p.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)];y.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)];M.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)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.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)];ca.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)];F.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;x.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;S.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+.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)];D.prototype.constraints=mxRectangleShape.prototype.constraints;C.prototype.constraints=mxRectangleShape.prototype.constraints;x.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;U.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d+c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return b};ia.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.5*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return b};ta.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)];ea.prototype.getConstraints=
+1),!1));return b};wa.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)];ea.prototype.getConstraints=
function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-e),f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));return b};ha.prototype.getConstraints=function(b,d,f){b=[];var c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ea.prototype.arrowWidth)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ea.prototype.arrowSize)))),c=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};Ea.prototype.getConstraints=
+.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,0));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));return b};Ga.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(f-e)/2,g=c+e,l=(d-e)/2,e=l+e;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,f));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+e),g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};I.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};G.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,n=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){g.popupMenuHandler.hideMenu();var b=g.view.scale,d=g.view.translate.x,c=g.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-g.view.scale)&&d==g.view.translate.x&&c==g.view.translate.y&&e.actions.get(g.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){g.isEnabled()&&(g.isSelectionEmpty()?e.actions.get("smartFit").funct():
-g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null})}).isEnabled=n;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=n;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=n;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
320,240,!0,!0)}).isEnabled=n;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
null!=b&&g.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(g)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(f){}try{mxClipboard.copy(g)}catch(f){e.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{g.getModel().endUpdate()}}else mxClipboard.paste(g)}),
b=!0)}catch(l){}b||mxClipboard.paste(g)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,f=0;f<b.length&&d;f++)d=d&&g.model.isEdge(b[f]);var c=g.view.translate,f=g.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var m=g.getCellGeometry(b[0]);null!=m&&(c=m.getTerminalPoint(!0))}c=null!=c?c:g.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(g.snap(g.popupMenuHandler.triggerX/f-e)),f=Math.round(g.snap(g.popupMenuHandler.triggerY/
-f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(m){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
+f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(p){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
(b=g.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedSize){g.getModel().beginUpdate();try{for(var b=g.getResizableCells(g.getSelectionCells()),d=0;d<b.length;d++)if(g.getModel().isVertex(b[d])){var c=g.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,g.getModel().setGeometry(b[d],c))}}finally{g.getModel().endUpdate()}}},
null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=g.getSelectionCell()||g.getModel().getRoot();g.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function f(d,f){var e=c.getValue(d);f=d.cloneValue(f);f.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||f.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||f.setAttribute("label",
g.convertValueToString(d));c.setValue(d,f)}b=null!=d?d:b;var c=g.getModel();if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=g.getEditableCells(g.getSelectionCells());if(0==l.length)f(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)f(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
@@ -2963,11 +2964,11 @@ null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=g.get
d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=g.getLinkForCell(g.getSelectionCell());null!=b&&g.openLink(b)});this.addAction("editLink...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d=g.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,f){d=mxUtils.trim(d);g.setLinkForCell(b,0<d.length?d:null);g.setAttributeForCell(b,"linkTarget",f)},!0,g.getLinkTargetForCell(b))}},
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=n;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));d.vertex=!0;f=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([d],!0));d.geometry.x=f.x;d.geometry.y=f.y;g.setAttributeForCell(d,"linkTarget",c);g.setLinkForCell(d,b);g.cellSizeUpdated(d,
-!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var m=b.getElementsByTagName("a"),
-k=0;k<m.length&&null==d;k++)m[k].textContent==b.textContent&&(d=m[k]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var n=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(n);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
-try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var m=
-mxUtils.getValue(state.style,"html","0");if("1"==m&&null==b){var k=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=g.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(n.childNodes);g.cellLabelChanged(state.cell,k);g.setCellStyles("html",b,[d[c]])}else"0"==m&&"1"==b&&(k=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(k=k.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(k)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
+!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
+q=0;q<k.length&&null==d;q++)k[q].textContent==b.textContent&&(d=k[q]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var n=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(n);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
+try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var k=
+mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var q=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(q=q.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=g.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(n.childNodes);g.cellLabelChanged(state.cell,q);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(q=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(q=q.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(q)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
function(){var b="0",d=g.getView().getState(g.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&g.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){g.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){g.isFastZoomEnabled()?
g.lazyZoom(!0,!0,e.buttonZoomDelay):g.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){g.isFastZoomEnabled()?g.lazyZoom(!1,!0,e.buttonZoomDelay):g.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=g.isSelectionEmpty()?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,c=g.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=g.backgroundImage&&
b.add(new mxRectangle(0,0,g.backgroundImage.width,g.backgroundImage.height));0==b.width||0==b.height?(g.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),g.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/b.width/d,(g.container.clientHeight-
@@ -2991,12 +2992,12 @@ g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("shar
c);g.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}});this.addAction("curved",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=g.view.getState(g.getSelectionCell()),d="1";null!=b&&null!=g.getFoldingImage(b)&&(d="0");g.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",g.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=g.getEditableCells(g.getSelectionCells());if(null!=b&&0<b.length){var d=
g.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&g.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&e.setDefaultStyle(g.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){g.isEnabled()&&e.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,p=c.x,c=c.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=n;)p+=n.x,c+=n.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);p=Math.round(g.snap(g.popupMenuHandler.triggerX/e-p));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
-e-c));d.addPointAt(d.state,p,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,q=c.x,c=c.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=n;)q+=n.x,c+=n.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);q=Math.round(g.snap(g.popupMenuHandler.triggerX/e-q));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
+e-c));d.addPointAt(d.state,q,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
null,[e]),g.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,g.getModel().setGeometry(e,l))}}}finally{g.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
-mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var m=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(m),
+mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(k),
g.insertImage(b,d,c);else{var f=g.getSelectionCells();if(null!=b&&(0<b.length||0<f.length)){var e=null;g.getModel().beginUpdate();try{if(0==f.length){var f=[g.insertVertex(g.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;e=f;g.fireEvent(new mxEventObject("cellsInserted","cells",e))}g.setCellStyles(mxConstants.STYLE_IMAGE,
-0<b.length?b:null,f);var k=g.getCurrentCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var p=f[0],q=g.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(p,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
+0<b.length?b:null,f);var m=g.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var p=f[0],q=g.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(p,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=n;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));t=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));
t=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
@@ -3008,22 +3009,22 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};DrawioFile.prototype.synchronizeFile=function(b,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,c):this.updateFile(b,c)};
DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(n){null!=c&&c(n)}}),c))};
DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:n,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(n,
-d[0]);k={};var l=this.ui.getHashValueForPages(f,k),n={},q=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",q==l,l);if(null!=l&&l!=q){var m=this.compressReportData(this.getAnonymizedXmlForPages(t)),p=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(F){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(F);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,F);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,F)}}catch(D){}}};
+d[0]);k={};var l=this.ui.getHashValueForPages(f,k),n={},m=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),q=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(D);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,D)}}catch(C){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var n=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?n(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?n(b):n(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),q=l.lastIndexOf("."),t="xml";0<q&&(t=l.substring(q));var m=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+g+"\n\nData:\n"+n,k)}catch(p){}};
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+g+"\n\nData:\n"+n,k)}catch(q){}};
DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(k){null!=c&&c(k)}};DrawioFile.prototype.copyFile=function(b,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var c=!0,e=0;e<b.length&&c;e++)c=c&&0==Object.keys(b[e]).length;return c};
-DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,q=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());q.apply(this,arguments)};t.model.beginUpdate();try{for(var m=
-0;m<b.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[m],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,m=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());m.apply(this,arguments)};t.model.beginUpdate();try{for(var p=
+0;p<b.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[p],!0,c,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=m;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(f!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
DrawioFile.prototype.save=function(b,c,e,k,g,n){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,k){};
@@ -3121,137 +3122,137 @@ dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return
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(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.relative}},{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(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.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## 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## 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 or a JSON string as used in Layout, Apply.\n## 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(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,m=b.state.dashed,k=f.fillWeight;
-0>k&&(k=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(m);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
+Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
+0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
this.path=[];this.passThrough=!1}b.prototype.moveOp="M";b.prototype.lineOp="L";b.prototype.quadOp="Q";b.prototype.curveOp="C";b.prototype.closeOp="Z";b.prototype.getStyle=function(b,d){var c=1;if(null!=this.shape.state){var f=this.shape.state.cell.id;if(null!=f)for(var e=0;e<f.length;e++)c=(c<<5)-c+f.charCodeAt(e)<<0}c={strokeWidth:this.canvas.state.strokeWidth,seed:c,preserveVertices:!0};f=this.rc.getDefaultOptions();b?c.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:
delete c.stroke;e=null;(c.filled=d)?(c.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):c.fill="";c.bowing=mxUtils.getValue(this.shape.style,"bowing",f.bowing);c.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",f.hachureAngle);c.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",f.curveFitting);c.roughness=mxUtils.getValue(this.shape.style,"jiggle",f.roughness);c.simplification=
mxUtils.getValue(this.shape.style,"simplification",f.simplification);c.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",f.disableMultiStroke);c.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",f.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);c.hachureGap="auto"==g?-1:g;c.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);c.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);c.zigzagOffset=mxUtils.getValue(this.shape.style,
-"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
-this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=
-function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var m=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=m)for(var k=0;k<m.length;k+=6)this.curveTo(m[k],m[k+1],m[k+2],m[k+3],m[k+4],m[k+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
-c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
-this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.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(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var m=this.configurePointerEvents,k=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
-c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=k;this.configurePointerEvents=m;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,m){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
-function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==f[g].getAttribute("class")){e.push(f[g]);
-break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&
-(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
-f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var m=b.charCodeAt(e),e=e+1;10!=m&&(d+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
-f){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){c=b.substring(e,k);break}}10==m&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
-d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
-2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
-0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
-ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=
-b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
-if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
-b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(c=parseFloat(b.zoomFactor),!isNaN(c)&&1<c?Graph.prototype.zoomFactor=c:EditorUi.debug("Invalid zoomFactor: value must be float > 1"));null!=b.gridSteps&&
-(c=parseInt(b.gridSteps),!isNaN(c)&&0<c?mxGraphView.prototype.gridSteps=c:EditorUi.debug("Invalid gridSteps: value must be int > 0"));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),f=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(f)&&0<f?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,f),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Invalid pageFormat: value must be {width: int, height: int}"));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);
-b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&("string"===typeof b.fontCss?Editor.configureFontCss(b.fontCss):EditorUi.debug("Invalid fontCss: value must be string"));null!=b.autosaveDelay&&(c=parseInt(b.autosaveDelay),!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: value must be int > 0"));
-if(null!=b.plugins&&!d)for(App.initPluginCallback(),c=0;c<b.plugins.length;c++)mxscript(b.plugins[c]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));
-d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var f=b[c].indexOf(")"),f=Editor.trimCssUrl(b[c].substring(0,f)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",f);e.setAttribute("as","font");e.setAttribute("crossorigin","");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(b){return b.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(b){b=null!=b?b:Editor.GUID_LENGTH;for(var d=[],c=0;c<b;c++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;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(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=
-this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");
-null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],
-url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(I){console.log("ExtFonts format error: "+I.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 c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&
-"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};
-Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var c=mxUtils.parseXml(d).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(b,d,c){return Editor.extractGraphModel.apply(this,
-arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=
-b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
-window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=
-function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");
-g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(V){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
-function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.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(b)||
-"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):
-f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(f);
-c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(qa){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(ba){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,d,
-c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var m=b.getElementsByTagName(c),k=0;k<m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=f.convert(c.getAttribute(l));if(null!=m&&"data:"!=m.substring(0,5)){var k=g[m];null==k?(e++,this.convertImageToDataUri(m,function(f){null!=f&&(g[m]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,k)}else null!=m&&c.setAttribute(l,m)}}catch(la){}})(m[k])});c("image","xlink:href");c("img",
-"src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
-4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
-Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,m){try{var k=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:p})},m)});p()}catch(na){null!=c&&c(na)}};Editor.prototype.absoluteCssFonts=
-function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
-d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),
-m=null,k=c[g].indexOf("format(",l);0<k&&(m=Editor.trimCssUrl(c[g].substring(k+7,c[g].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
-else if("eot"==m||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),m)}e()}else d(b)};Editor.prototype.loadFonts=
-function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,
-mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
-Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,m,k,p,q,n,u,v,x,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var G=k?null:n.background;G==mxConstants.NONE&&(G=null);null==G&&(G=f);null==G&&0==k&&(G=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(n.getSvg(null,null,u,v,null,l,null,null,null,p,null,t,y,D),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(k,c)},0):(v.drawImage(f,0,0),b(k,c))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=d&&(m=g?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);m=this.getMaxCanvasScale(p,q,m);p=
-Math.ceil(m*p);q=Math.ceil(m*q);k.setAttribute("width",p);k.setAttribute("height",q);var v=k.getContext("2d");null!=G&&(v.beginPath(),v.rect(0,0,p,q),v.fillStyle=G,v.fill());1!=m&&v.scale(m,m);if(x){var t=n.view,y=t.scale;t.scale=1;var B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var B="data:image/svg+xml;base64,"+B,D=n.gridSize*t.gridSteps*m,C=n.getGraphBounds(),A=t.translate.x*y,N=t.translate.y*y,V=A+(C.x-A)/y-u,I=N+(C.y-N)/y-u,E=new Image;E.onload=function(){try{for(var b=
--Math.round(D-mxUtils.mod((A-V)*m,D)),d=-Math.round(D-mxUtils.mod((N-I)*m,D));b<p;b+=D)for(var c=d;c<q;c+=D)v.drawImage(E,b/m,c/m);l()}catch(X){null!=e&&e(X)}};E.onerror=function(b){null!=e&&e(b)};E.src=B}else l()}catch(ya){null!=e&&e(ya)}});f.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ea){null!=
-e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var n=g,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[g]=n;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
-8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=k;k+=d;return b.substring(c,k)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function m(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,k);do{var p=l(b);if("IDAT"==g(b,4)){e=b.substring(0,k-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=m(c)+m(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=m(c.length)+d+c+m(f^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);g(b,p);g(b,4)}while(p);return"data:image/png;base64,"+
-(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var p=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=p.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
-b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
-g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};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:"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);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",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
-type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},
-{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},
-{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",
-stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=
-0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(ba){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
-e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
-mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="104px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="104px",b.appendChild(c)):
-c.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){n.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],m=c.parentRow.nextSibling;m&&m.getAttribute("data-pName")==b;)l.push(m.getAttribute("data-pValue")),m=m.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
-null!=c.countProperty&&(n.setCellStyles(c.countProperty,l.length,n.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var k=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(k);p=p.join(",");n.setCellStyles(c.dependentProps[b],p,n.getSelectionCells());e.push(c.dependentProps[b]);g.push(p)}if("function"==
-typeof c.onChange)c.onChange(n,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height=
-"4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,m){null!=d&&(d=d.split(","),u.push({name:b,
-values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var k=l,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var n={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=p(b,"",n,0==q%2,m);f(b,e,n);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function m(b,d,c,f,e,g,l){if(0<e){var m=Array(e);d=null!=d?d.split(","):[];for(var k=0;k<e;k++)m[k]=null!=d[k]?d[k]:null!=f?f:"";u.push({name:b,values:m,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function k(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function p(d,c,p,n,u){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+
-(u?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);n=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",n=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,v);y.setAttribute("title",v);n&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,p));else if("bool"==
-x||"boolean"==x)y.appendChild(k(d,c,p));else if("enum"==x){var D=p.enumList;for(u=0;u<D.length;u++)if(v=D[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<D.length;l++){var m=D[l],k=document.createElement("option");k.value=mxUtils.htmlEntities(m.val);mxUtils.write(k,mxResources.get(m.dispName,null,m.dispName));g.appendChild(k)}g.value=c;b.appendChild(g);
-mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,p)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,u)):"staticArr"==x?y.appendChild(m(d,c,p.subType,p.subDefVal,p.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,
-"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,p)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=p.min&&
-(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",p,p.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position=
-"relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;y.style.verticalAlign="middle";t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var D=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),
-c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(va){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;D()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var G=!1,B=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(p("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var C=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
-x.type)B=!B;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,E=[],F=[],t=0;t<N.length;t++){var P=c.style[N[t]];F.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}x.dependentPropsDefVal=F;x.dependentPropsVals=E}v.appendChild(p(A,C,x,G,B));G=!G}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=p(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
-index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(v);D();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="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(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var m=[],k=0;k<this.defaultColorSchemes.length;k++){var p=document.createElement("div");
-p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);m.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(m[this.format.currentScheme].style.background="transparent");
-this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);m[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var m=f.getModel().getStyle(e[l]),k=0;k<g.length;k++)m=mxUtils.removeStylename(m,g[k]);var p=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:
-c.initialdefaultEdgeStyle;null!=b?(m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(m=""==b.fill?mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(m=""==b.stroke?mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,
-b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(m=mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),m=mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),m=mxUtils.setStyle(m,
-mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],m)}}finally{f.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";
-null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):
-b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=
-mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+m}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
-28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(u,
-"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"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==);";
+"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state&&"transparent"!=this.shape.state.view.graph.defaultPageBackgroundColor?this.shape.state.view.graph.defaultPageBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=
+function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?
+this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],
+k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(ca){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;
+b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};b.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(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):
+this.createRoughCanvas(b)};var c=mxShape.prototype.paint;mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=
+function(){});d.handJiggle.passThrough=!0;c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=
+!1):f.apply(this,arguments)}})();Editor.fastCompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==
+f[g].getAttribute("class")){e.push(f[g]);break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,
+f))),null!=f&&"%"==f.charAt(0)&&(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,
+d){var c=mxUtils.trim(mxUtils.getTextContent(b)),f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=
+function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));
+k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),
+null!=d&&0<d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,
+e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(G){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;
+null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;
+ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=b.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=b.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=b.templateFile&&(EditorUi.templateFile=
+b.templateFile);null!=b.styles&&(Editor.styles=b.styles);null!=b.globalVars&&(Editor.globalVars=b.globalVars);null!=b.compressXml&&(Editor.compressXml=b.compressXml);null!=b.includeDiagram&&(Editor.defaultIncludeDiagram=b.includeDiagram);null!=b.simpleLabels&&(Editor.simpleLabels=b.simpleLabels);b.customFonts&&(Menus.prototype.defaultFonts=b.customFonts.concat(Menus.prototype.defaultFonts));b.customPresetColors&&(ColorDialog.prototype.presetColors=b.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=b.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=b.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=b.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b.css));var f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(c,f)}null!=b.libraries&&(Sidebar.prototype.customEntries=b.libraries);null!=b.enabledLibraries&&(Sidebar.prototype.enabledLibraries=b.enabledLibraries);
+null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=b.defaultCustomLibraries);null!=b.enableCustomLibraries&&(Editor.enableCustomLibraries=b.enableCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);null!=b.zoomWheel&&(Graph.zoomWheel=b.zoomWheel);null!=b.zoomFactor&&(c=parseFloat(b.zoomFactor),
+!isNaN(c)&&1<c?Graph.prototype.zoomFactor=c:EditorUi.debug("Invalid zoomFactor: value must be float > 1"));null!=b.gridSteps&&(c=parseInt(b.gridSteps),!isNaN(c)&&0<c?mxGraphView.prototype.gridSteps=c:EditorUi.debug("Invalid gridSteps: value must be int > 0"));null!=b.pageFormat&&(c=parseInt(b.pageFormat.width),f=parseInt(b.pageFormat.height),!isNaN(c)&&0<c&&!isNaN(f)&&0<f?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,c,f),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
+EditorUi.debug("Invalid pageFormat: value must be {width: int, height: int}"));b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&("string"===typeof b.fontCss?Editor.configureFontCss(b.fontCss):EditorUi.debug("Invalid fontCss: value must be string"));null!=b.autosaveDelay&&(c=parseInt(b.autosaveDelay),
+!isNaN(c)&&0<c?DrawioFile.prototype.autosaveDelay=c:EditorUi.debug("Invalid autosaveDelay: value must be int > 0"));if(null!=b.plugins&&!d)for(App.initPluginCallback(),c=0;c<b.plugins.length;c++)mxscript(b.plugins[c]);null!=b.maxImageBytes&&(EditorUi.prototype.maxImageBytes=b.maxImageBytes);null!=b.maxImageSize&&(EditorUi.prototype.maxImageSize=b.maxImageSize)}};Editor.configureFontCss=function(b){if(null!=b){Editor.prototype.fontCss=b;var d=document.getElementsByTagName("script")[0];if(null!=d&&
+null!=d.parentNode){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(b));d.parentNode.insertBefore(c,d);b=b.split("url(");for(c=1;c<b.length;c++){var f=b[c].indexOf(")"),f=Editor.trimCssUrl(b[c].substring(0,f)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",f);e.setAttribute("as","font");e.setAttribute("crossorigin","");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(b){return b.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(b){b=null!=b?b:Editor.GUID_LENGTH;for(var d=[],c=0;c<b;c++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;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(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var c=d.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==d.nodeName){c=d.getAttribute("style")||
+"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(e=new mxCodec(f.ownerDocument),e.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var e=new mxCodec(f.ownerDocument);e.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=
+c;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");c=d.getAttribute("backgroundImage");null!=c?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(c)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),
+!1);if(c=d.getAttribute("extFonts"))try{for(c=c.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}}),f=0;f<c.length;f++)this.graph.addExtFont(c[f].name,c[f].url)}catch(G){console.log("ExtFonts format error: "+G.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 c=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=
+function(b,d){b=null!=b?b:!0;var f=c.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&f.setAttribute("style",this.graph.currentStyle);var e=this.graph.getBackgroundImageObject(this.graph.backgroundImage,d);null!=e&&f.setAttribute("backgroundImage",JSON.stringify(e));f.setAttribute("math",this.graph.mathEnabled?"1":"0");f.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(e=this.graph.extFonts.map(function(b){return b.name+
+"^"+b.url}),f.setAttribute("extFonts",e.join("|")));return f};Editor.prototype.isDataSvg=function(b){try{var d=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var c=mxUtils.parseXml(d).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=
+function(b,d,c){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};
+var k=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){k.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
+Editor.initMath=function(b,d){if("undefined"===typeof window.MathJax){b=(null!=b?b:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){window.setTimeout(function(){"hidden"!=b.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])},0)};var c=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";d=null!=d?d:{"HTML-CSS":{availableFonts:[c],imageFont:null},
+SVG:{font:c,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var f=Editor.prototype.init;Editor.prototype.init=function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var e=document.createElement("script");e.setAttribute("type","text/javascript");e.setAttribute("src",
+b);c[0].parentNode.appendChild(e)}try{if(mxClient.IS_GC||mxClient.IS_SF){var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(g)}}catch(ca){}}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;
+var d=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(b)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(b){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.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(b)||"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==
+b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,
+mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(ma){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);
+c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(X){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,d,c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=f.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=g[k];null==m?(e++,this.convertImageToDataUri(k,function(f){null!=f&&(g[k]=f,c.setAttribute(l,f));
+e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(la){}})(k[m])});c("image","xlink:href");c("img","src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);
+d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,k){try{var m=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==
+typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=
+c&&c({code:App.ERROR_TIMEOUT,retry:p})},k)});p()}catch(ka){null!=c&&c(ka)}};Editor.prototype.absoluteCssFonts=function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&
+(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);
+b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),k=null,m=c[g].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[g].substring(m+7,c[g].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==
+k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,
+null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;null!=b&&b()})):null!=b&&b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==
+f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&
+0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):
+c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,p,q,n,u,x,v,t,y,B){try{g=null!=g?g:!0;
+l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var F=m?null:n.background;F==mxConstants.NONE&&(F=null);null==F&&(F=f);null==F&&0==m&&(F=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(n.getSvg(null,null,u,x,null,l,null,null,null,p,null,t,y,B),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(f,0,0);b(m,c)},0):(x.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),
+p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);k=this.getMaxCanvasScale(p,q,k);p=Math.ceil(k*p);q=Math.ceil(k*q);m.setAttribute("width",p);m.setAttribute("height",q);var x=m.getContext("2d");null!=F&&(x.beginPath(),x.rect(0,0,p,q),x.fillStyle=F,x.fill());1!=k&&x.scale(k,k);if(v){var t=n.view,y=t.scale;t.scale=1;var A=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var A="data:image/svg+xml;base64,"+
+A,B=n.gridSize*t.gridSteps*k,C=n.getGraphBounds(),I=t.translate.x*y,N=t.translate.y*y,G=I+(C.x-I)/y-u,E=N+(C.y-N)/y-u,D=new Image;D.onload=function(){try{for(var b=-Math.round(B-mxUtils.mod((I-G)*k,B)),d=-Math.round(B-mxUtils.mod((N-E)*k,B));b<p;b+=B)for(var c=d;c<q;c+=B)x.drawImage(D,b/k,c/k);l()}catch(W){null!=e&&e(W)}};D.onerror=function(b){null!=e&&e(b)};D.src=A}else l()}catch(za){null!=e&&e(za)}});f.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);
+var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(ea){null!=e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ia){null!=e&&e(ia)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var n=g,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[g]=n;Editor.updateCRC=
+function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&
+255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var p=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,
+c,0,c.length);e+=k(c.length)+d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+p);g(b,p);g(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;
+ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.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 b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(b){b=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});
+Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=q.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);
+d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=
+function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};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:"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);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",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",
+dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];
+mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},
+{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,
+defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=
+[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",
+font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",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(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||
+(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(X){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=
+b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var v=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="104px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),
+c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="104px",b.appendChild(c)):c.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){n.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==
+b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");null!=c.countProperty&&(n.setCellStyles(c.countProperty,l.length,n.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];
+if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(m);p=p.join(",");n.setCellStyles(c.dependentProps[b],p,n.getSelectionCells());e.push(c.dependentProps[b]);g.push(p)}if("function"==typeof c.onChange)c.onChange(n,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";
+c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":
+d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,k){null!=d&&(d=d.split(","),u.push({name:b,values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var n={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,
+countProperty:g},q=p(b,"",n,0==q%2,k);f(b,e,n);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function k(b,d,c,f,e,g,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=f?f:"";u.push({name:b,values:k,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";
+e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function p(d,c,p,n,u){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+(u?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);n=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",n=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,
+v);y.setAttribute("title",v);n&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,p));else if("bool"==x||"boolean"==x)y.appendChild(m(d,c,p));else if("enum"==x){var B=p.enumList;for(u=0;u<B.length;u++)if(v=B[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<B.length;l++){var k=
+B[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);mxUtils.write(m,mxResources.get(k.dispName,null,k.dispName));g.appendChild(m)}g.value=c;b.appendChild(g);mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,p)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,u)):"staticArr"==x?y.appendChild(k(d,c,p.subType,p.subDefVal,p.size,t,u)):"readOnly"==
+x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,
+b,p)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=p.min&&(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",p,p.index);mxEvent.consume(b)})),u.style.height=
+"16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position="relative";b.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;
+y.style.verticalAlign="middle";t.appendChild(y);mxUtils.write(t,mxResources.get("property"));v.style.cursor="pointer";var B=function(){var d=x.querySelectorAll(".gePropNonHeaderRow"),c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(pa){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=
+c};mxEvent.addListener(v,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;B()});v.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");v.appendChild(t);x.appendChild(v);var C=!1,F=!1,v=null;1==c.vertices.length&&0==c.edges.length?v=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(v=c.edges[0].id);null!=v&&x.appendChild(p("id",mxUtils.htmlEntities(v),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(v=
+d[A],"function"!=typeof v.isVisible||v.isVisible(c,this)){var I=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(c,this):v.defVal;if("separator"==v.type)F=!F;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var N=v.dependentProps,E=[],D=[],t=0;t<N.length;t++){var P=c.style[N[t]];D.push(d[N[t]].subDefVal);E.push(null!=P?P.split(","):[])}v.dependentPropsDefVal=D;v.dependentPropsVals=
+E}x.appendChild(p(A,I,v,C,F));C=!C}}for(t=0;t<u.length;t++)for(v=u[t],d=v.parentRow,c=0;c<v.values.length;c++)A=p(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:c,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==c%2,v.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(x);B();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,
+"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var g="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(" "),l=document.createElement("div");
+l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var k=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight="3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(p,"click",mxUtils.bind(this,
+function(){q(b)}))})(m);k.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,
+l=0;l<e.length;l++){for(var k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var p=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,
+null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],k)}}finally{f.getModel().endUpdate()}}));d.className="geStyleButton";d.style.width="36px";d.style.height=
+10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":
+d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):l+" "+(b.stroke||
+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=b.title&&d.setAttribute("title",b.title)}else{var l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,
+4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(u,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="210px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,f=1==d.cells.length?f.view.getState(d.cells[0]):null;null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",
mxResources.get("editShape")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0<d.cells.length&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),
@@ -3263,41 +3264,41 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=
null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||
2,c.colPercentages=d.colPercentages,c.rowPercentages=d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow=
-"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var F=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,m,k,p,q){F.apply(this,arguments);Graph.processFontAttributes(q)};
-var D=mxText.prototype.redraw;mxText.prototype.redraw=function(){D.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:m.slice();f();l.refresh()}function g(b,c){p.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
-"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(n,
+"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,p,q){D.apply(this,arguments);Graph.processFontAttributes(q)};
+var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){p.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
+"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(n,
g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(d||Editor.isDarkMode())n.style.filter="invert(100%)";q.appendChild(n);mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
-"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=m.slice(),k=mxUtils.indexOf(c,
-b);c.splice(k,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});p.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
-if(d||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(m,b);0<=c&&m.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(n)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
-"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}p.appendChild(q)}k.appendChild(p)})(b[q]);g.appendChild(k);p.appendChild(g)}}var l=this,m=l.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
-"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=l.isEnabled()?"1px solid #808080":"none";p.style.bottom=l.isEnabled()?"48px":"10px";k.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(m=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
-q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(m,function(b){m=b;u()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";l.addListener(mxEvent.ROOT,function(){m=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(m,f[e])&&m.push(f[e]);m.sort();l.isSelectionEmpty()?g(m):g(m,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
-u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(n),k.appendChild(v));return{div:k,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
+"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=k.slice(),m=mxUtils.indexOf(c,
+b);c.splice(m,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});p.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
+if(d||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(k,b);0<=c&&k.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(n)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
+"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}p.appendChild(q)}m.appendChild(p)})(b[q]);g.appendChild(m);p.appendChild(g)}}var l=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
+"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=l.isEnabled()?"1px solid #808080":"none";p.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
+q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
+u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(n),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
+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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
{}};var K=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=K.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,d,c,f,e,g,l,m,k,p,q,n,u,v){var x=null,t=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),D=this.getCustomFonts();if(q&&0<D.length){var A=y.ownerDocument,G=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");
-null!=A.setAttributeNS?G.setAttributeNS("type","text/css"):G.setAttribute("type","text/css");for(var N="",B="",E=0;E<D.length;E++){var C=D[E].name,F=D[E].url;Graph.isCssFontUrl(F)?N+="@import url("+F+");\n":B+='@font-face {\nfont-family: "'+C+'";\nsrc: url("'+F+'");\n}\n'}G.appendChild(A.createTextNode(N+B));y.getElementsByTagName("defs")[0].appendChild(G)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+function(b,d,c,f,e,g,l,k,m,p,q,n,u,v){var x=null,t=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),B=this.getCustomFonts();if(q&&0<B.length){var C=y.ownerDocument,F=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,"style"):C.createElement("style");
+null!=C.setAttributeNS?F.setAttributeNS("type","text/css"):F.setAttribute("type","text/css");for(var A="",N="",E=0;E<B.length;E++){var I=B[E].name,D=B[E].url;Graph.isCssFontUrl(D)?A+="@import url("+D+");\n":N+='@font-face {\nfont-family: "'+I+'";\nsrc: url("'+D+'");\n}\n'}F.appendChild(C.createTextNode(A+N));y.getElementsByTagName("defs")[0].appendChild(F)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=
f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var J=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){J.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||
this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
-var A=Graph.prototype.refresh;Graph.prototype.refresh=function(){A.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
+var B=Graph.prototype.refresh;Graph.prototype.refresh=function(){B.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||
-(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),m=mxUtils.bind(this,function(){0<f&&f--;0==f&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;m()}),
-f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,m,c?0:p.fadeIn.delay));null!=p.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,m,c?0:p.fadeOut.delay));
+(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<f&&f--;0==f&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),
+f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,k,c?0:p.fadeIn.delay));null!=p.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,k,c?0:p.fadeOut.delay));
null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(g(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){g();var n=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(n),1);this.setCellsVisible(n,!0)}null!=p.hide&&(g(),n=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(n),
0),this.setCellsVisible(n,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(g(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(g(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));n=[];null!=p.select&&this.isEnabled()&&(n=this.getCellsForAction(p.select),this.setSelectionCells(n));null!=p.highlight&&(n=this.getCellsForAction(p.highlight),
this.highlightCells(n,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(n=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<n.length&&this.scrollCellToVisible(n[0]);if(null!=p.tags){n=[];null!=p.tags.hidden&&(n=n.concat(p.tags.hidden));if(null!=p.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(p.tags.visible,u[v])&&0>mxUtils.indexOf(n,u[v])&&n.push(u[v]);this.hiddenTags=n;this.refresh()}0<q.length&&
-(f++,this.executeAnimations(q,m,c?1:p.steps,c?0:p.delay));0==f?k():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
-e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(U){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
+(f++,this.executeAnimations(q,k,c?1:p.steps,c?0:p.delay));0==f?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
+e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(S){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
d.length;c++){var f=d[c],e;for(e in f)this.updateCustomLinkAction(b,f[e],"cells"),this.updateCustomLinkAction(b,f[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var f=[],e=0;e<d[c].length;e++)if("*"==d[c][e])f.push(d[c][e]);else{var g=b[d[c][e]];null!=g?""!=g&&f.push(g):f.push(d[c][e])}d[c]=f}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var f=
[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&f.push(c[e]);c=f}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=f},f));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var P=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return P.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},m=0;m<b.length;m++)0<b[m].length&&(l[b[m]]=!0,g++);for(m=0;m<d.length;m++)if(c&&this.model.getParent(d[m])==
-this.model.root||this.model.isVertex(d[m])||this.model.isEdge(d[m])){var k=this.getTagsForCell(d[m]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<g;q++)null!=l[k[q]]&&p++;p=p==g}p&&(1!=f||this.isCellVisible(d[m]))&&e.push(d[m])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,g++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
+this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),p=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=p=0;q<m.length&&p<g;q++)null!=l[m[q]]&&p++;p=p==g}p&&(1!=f||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
c=[];if(0<e.length){for(var e=e.split(" "),g={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])g[e[l]]=!0,c.push(e[l]);d=g}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]);if(0<e.length)for(var e=e.split(" "),g=0;g<e.length;g++)null==c[e[g]]&&(c[e[g]]=!0,d.push(e[g]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
-b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.trim(d[l]);""!=m&&0>mxUtils.indexOf(e,m)&&(f=0<f.length?f+" "+m:m,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
-f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.indexOf(e,d[l]);0<=m&&(e.splice(m,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
+b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(f=0<f.length?f+" "+k:k,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
+f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(b,d,c,f){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,f)};Graph.prototype.highlightCell=function(b,d,c,f){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=f&&(g.opacity=f);g.highlight(b);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var f=b.ownerDocument,e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
@@ -3315,92 +3316,92 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/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(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var T=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,m,k,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
-mxStencilRegistry.getStencil(q)}return T.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(m,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(m,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,m=d.currentTranslate,k=d.currentScale,p=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
-d.view.translate=new mxPoint(0,0),d.view.scale=1);var n=d.getGraphBounds(),u=0,v=0,x=Q.get(),t=1/d.pageScale,A=D.checked;if(A)var t=parseInt(C.value),N=parseInt(J.value),t=Math.min(x.height*N/(n.height/d.view.scale),x.width*t/(n.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!A&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):
-A=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,A);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var V=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
+mxStencilRegistry.getStencil(q)}return V.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,p=d.view.translate,q=d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,
+d.view.translate=new mxPoint(0,0),d.view.scale=1);var n=d.getGraphBounds(),u=0,v=0,x=H.get(),t=1/d.pageScale,C=B.checked;if(C)var t=parseInt(J.value),N=parseInt(R.value),t=Math.min(x.height*N/(n.height/d.view.scale),x.width*t/(n.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!C&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):
+C=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,C);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var F=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=F.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
-e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=A;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,A=g[u].url,Graph.isCssFontUrl(A)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
-c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=m,d.currentScale=k,d.view.translate=p,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,m=v.value,p=!q.checked,
-n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,m,D.checked,C.value,J.value,parseInt(y.value)/100,parseInt(H.value)/100,Q.get());else{p&&(p=l==k&&m==k);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(m)-1);for(var t=x;t<=p;t++){var A=b.pages[t],l=A==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),m=!0,x=!1,N=null,E=null;null==A.viewState&&null==A.root&&b.updatePageRoot(A);null!=A.viewState&&
-(m=A.viewState.pageVisible,x=A.viewState.mathEnabled,N=A.viewState.background,E=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=m;l.mathEnabled=x;var F=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?A.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:F.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(A);l.model.setRoot(A.root)}n=
+if("undefined"!==typeof MathJax){var D=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=D.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=C;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,C=g[u].url,Graph.isCssFontUrl(C)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(C)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
+c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(C)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=p,d.view.scale=q);return c}var f=parseInt(I.value)/100;isNaN(f)&&(f=1,I.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,p=!q.checked,
+n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,B.checked,J.value,R.value,parseInt(y.value)/100,parseInt(I.value)/100,H.get());else{p&&(p=l==m&&k==m);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(k)-1);for(var t=x;t<=p;t++){var C=b.pages[t],l=C==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,E=null;null==C.viewState&&null==C.root&&b.updatePageRoot(C);null!=C.viewState&&
+(k=C.viewState.pageVisible,x=C.viewState.mathEnabled,N=C.viewState.background,E=C.viewState.backgroundImage,l.extFonts=C.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?C.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(C);l.model.setRoot(C.root)}n=
c(l,n,t!=p);l!=e&&l.container.parentNode.removeChild(l.container)}}else n=c(e);null==n?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(p=n.wnd.document,d&&(n.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),n.closeDocument(),!n.mathEnabled&&d&&PrintDialog.printPreview(n));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
-l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var m=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
+l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var n=q.cloneNode(!0);q.setAttribute("checked","checked");n.setAttribute("value","range");p.appendChild(n);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";p.appendChild(u);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=u.cloneNode(!0);p.appendChild(v);mxEvent.addListener(u,"focus",function(){n.checked=!0});mxEvent.addListener(v,"focus",function(){n.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(m=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){k=l+1;u.value=k;v.value=k;break}u.setAttribute("max",m);v.setAttribute("max",m);b.isPagesEnabled()?1<m&&(g.appendChild(p),
+mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=u.cloneNode(!0);p.appendChild(v);mxEvent.addListener(u,"focus",function(){n.checked=!0});mxEvent.addListener(v,"focus",function(){n.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(p),
n.checked=!0):n.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);
-mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var p=p.cloneNode(!1),D=t.cloneNode(!0);D.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(D);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),F=document.createElement("td"),
-P=F.cloneNode(!0),K=F.cloneNode(!0),G=F.cloneNode(!0),T=F.cloneNode(!0),M=F.cloneNode(!0);F.style.textAlign="right";G.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var C=document.createElement("input");C.style.cssText="margin:0 8px 0 8px;";C.setAttribute("value","1");C.setAttribute("min","1");C.setAttribute("type","number");C.style.width="40px";P.appendChild(C);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));K.appendChild(l);mxUtils.write(G,
-mxResources.get("fitToBy"));var J=C.cloneNode(!0);T.appendChild(J);mxEvent.addListener(C,"focus",function(){D.checked=!0});mxEvent.addListener(J,"focus",function(){D.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));M.appendChild(l);N.appendChild(F);N.appendChild(P);N.appendChild(K);E.appendChild(G);E.appendChild(T);E.appendChild(M);A.appendChild(N);A.appendChild(E);x.appendChild(A);p.appendChild(x);g.appendChild(p);p=document.createElement("div");l=
-document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var Q=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);g.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var p=p.cloneNode(!1),B=t.cloneNode(!0);B.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(B);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var C=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),D=document.createElement("td"),
+P=D.cloneNode(!0),K=D.cloneNode(!0),F=D.cloneNode(!0),V=D.cloneNode(!0),M=D.cloneNode(!0);D.style.textAlign="right";F.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";P.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));K.appendChild(l);mxUtils.write(F,
+mxResources.get("fitToBy"));var R=J.cloneNode(!0);V.appendChild(R);mxEvent.addListener(J,"focus",function(){B.checked=!0});mxEvent.addListener(R,"focus",function(){B.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));M.appendChild(l);N.appendChild(D);N.appendChild(P);N.appendChild(K);E.appendChild(F);E.appendChild(V);E.appendChild(M);C.appendChild(N);C.appendChild(E);x.appendChild(C);p.appendChild(x);g.appendChild(p);p=document.createElement("div");l=
+document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var H=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var I=document.createElement("input");I.style.cssText="margin:0 8px 0 8px;";
+I.setAttribute("value","100 %");I.style.width="60px";p.appendChild(I);g.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);g.appendChild(l);this.container=g};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 b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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 Q=document.createElement("canvas"),ga=new Image;ga.onload=function(){try{Q.getContext("2d").drawImage(ga,0,0);var b=Q.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=b&&6<b.length}catch(C){}};ga.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(G){}})();
+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 R=document.createElement("canvas"),ba=new Image;ba.onload=function(){try{R.getContext("2d").drawImage(ba,0,0);var b=R.toDataURL("image/png");Editor.prototype.useCanvasForExport=
+null!=b&&6<b.length}catch(I){}};ba.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(F){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.5.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.5.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="1"==urlParams.dev?"/cache":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&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,
-noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,m,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(b);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(y){}try{n||null==window.console||console.error(k,b,c,e,g,m)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(b,c,e,g,k,q,n){q=null!=q?q:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}try{n||null==window.console||console.error(q,b,c,e,g,k)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
"")}catch(l){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=g;g+=d;return b.substring(c,g)}function f(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var g=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=f(b);var l=d(b,4);if(null!=c&&c(g-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
l)break}while(e)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(m){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(p){}};e.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(m){}try{c=
-document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(p){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(q){}};e.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(p){}try{c=
+document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var m=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),m=document.createElement("div"),
-m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily=Editor.defaultHtmlFont,m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,b)+"px",m.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(m.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),m.innerHTML=l,e.appendChild(m),f.status=m),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),m=!0);return m};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
-return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var k=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
+k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
+return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
-function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,m=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var d=
-m.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&m.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&m.movePage(d,0)};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,d+1)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,m.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&m.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
-d&&m.selectPage(m.pages[0])};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.selectNextPage(!0)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(b),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=k?mxUtils.getXml(k):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
+function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,k=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
+k.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&k.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&k.movePage(d,0)};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,d+1)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,k.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&k.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
+d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),q=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=q?mxUtils.getXml(q):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,m,k,n,v,t,x,F){c=null!=c?c:this.editor.graph;m=null!=m?m:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(F){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(p);if(Graph.decompress(l)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(p)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,q,n,v,t,x,D){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(D){var m=
+b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));F=F?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!k&&!m&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))F=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(k||!m&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(g=null),F=this.getEmbeddedSvg(F,c,g,null,v,t,f);return F};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));D=D?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!q&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))D=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(q||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),D=this.getEmbeddedSvg(D,c,g,null,v,t,f);return D};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*
Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?d.push(" "):d.push("?"):d.push(c?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var d=0;d<b[EditorUi.DIFF_INSERT].length;d++)try{var c=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));
-b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(p){b[EditorUi.DIFF_INSERT][d].data=p.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
+b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(q){b[EditorUi.DIFF_INSERT][d].data=q.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete g.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(g.cells).length&&delete g.cells);0==Object.keys(g).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,m,k,n,
-v,t,x,F){m=null!=m?m:!0;k=null!=k?k:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&
-null!=p.viewState&&d.setBackgroundImage(p.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(m,k,x,F);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,m,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,m,
-k){k=null!=k?k:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;k=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==m&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
-"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=m&&(m=m.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=e?"<title>"+mxUtils.htmlEntities(e)+
-"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,m){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,q,n,
+v,t,x,D){k=null!=k?k:!0;q=null!=q?q:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var m=this.pages[0];this.currentPage==m?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=m.viewState&&
+null!=m.viewState&&d.setBackgroundImage(m.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}n=null!=n?n:this.getXmlFileData(k,q,x,D);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,
+q){q=null!=q?q:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=q?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;q=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",q);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
+"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+
+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
null;var d=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b&&"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var c=null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),
null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),n=k.getChildren(k.root),e=0;e<n.length;e++){var v=n[e];k.setVisible(v,b[v.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,p,n,v,t,x,F,D){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
-var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&F?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,
-c){try{var f=this.editor.graph.pageVisible;null!=p&&(this.editor.graph.pageVisible=p);var e=this.createDownloadRequest(d,b,g,c,n,k,v,t,x,F,D);this.editor.graph.pageVisible=f;return e}catch(ga){this.handleError(ga)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;
-if(n||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,p,n,v,t,
-x,F){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==p?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=F?m="&from="+F.from+"&to="+F.to:0==p&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){l="&from="+p;break}p=
-d.background;"png"!=c&&"pdf"!=c||!k?k||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
+this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,q,n,v,t,x,D,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
+var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&D?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,
+c){try{var f=this.editor.graph.pageVisible;null!=q&&(this.editor.graph.pageVisible=q);var e=this.createDownloadRequest(d,b,g,c,n,k,v,t,x,D,C);this.editor.graph.pageVisible=f;return e}catch(ba){this.handleError(ba)}}));else{var m=null,p=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;
+if(n||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();p(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();p(b)}),g)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,q,n,v,t,
+x,D){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==q?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=D?m="&from="+D.from+"&to="+D.to:0==q&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){l="&from="+q;break}q=
+d.background;"png"!=c&&"pdf"!=c||!k?k||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==
b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+
" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,
b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var n=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;
-if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var F=x.attributes,D=0;D<F.length;D++)g.setAttributeForCell(v,F[D].nodeName,0<F[D].nodeValue.length?F[D].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+v.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(v,E)}catch(P){null!=window.console&&console.log("Error in style for "+v.id+": "+P)}try{var K=b.getAttribute("icon");if(null!=K){var L=0<K.length?JSON.parse(K):null;null!=
-L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=g.getCellGeometry(v);if(null!=J){J=J.clone();for(key in H){var A=parseFloat(H[key]);"dx"==key?J.x+=A:"dy"==key?J.y+=A:"dw"==key?J.width+=A:"dh"==key?J.height+=A:J[key]=parseFloat(H[key])}g.model.setGeometry(v,J)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+
+if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var D=x.attributes,C=0;C<D.length;C++)g.setAttributeForCell(v,D[C].nodeName,0<D[C].nodeValue.length?D[C].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+v.id+": "+P)}try{var E=b.getAttribute("style");null!=E&&g.model.setStyle(v,E)}catch(P){null!=window.console&&console.log("Error in style for "+v.id+": "+P)}try{var K=b.getAttribute("icon");if(null!=K){var L=0<K.length?JSON.parse(K):null;null!=
+L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+": "+P)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),J=g.getCellGeometry(v);if(null!=J){J=J.clone();for(key in H){var B=parseFloat(H[key]);"dx"==key?J.x+=B:"dy"==key?J.y+=B:"dw"==key?J.width+=B:"dh"==key?J.height+=B:J[key]=parseFloat(H[key])}g.model.setGeometry(v,J)}}}catch(P){null!=window.console&&console.log("Error in icon for "+v.id+
": "+P)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(n=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
1);b=b.nextSibling}}finally{k.endUpdate()}null!=n&&this.chromelessResize&&this.chromelessResize(!0,n)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,n=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+n+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};
EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
@@ -3411,56 +3412,56 @@ b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete t
u.message,label:"stack_"+u.stack})}catch(v){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,f=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");f.root=b[g].root;var n=e.encode(f);this.editor.graph.saveViewState(b[g].viewState,n,!0);n.removeAttribute("pageWidth");n.removeAttribute("pageHeight");k.appendChild(n);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,f){return!f||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
d&&"y"!=d&&"width"!=d&&"height"!=d?f&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,
-!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,p,n){};
+!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,q,n){};
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(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");
mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,
e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,
-function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;g=q.getAttribute("title");null!=g&&0<
-g.length&&".scratchpad"!=b.title&&q.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
-"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var D=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=D?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
-if(b.isEditable()){var E=this.editor.graph,K=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K),K=t.cloneNode(!1),K.setAttribute("src",Editor.spinImage),K.setAttribute("title",mxResources.get("saving")),K.style.cursor="default",K.style.marginRight="2px",K.style.marginTop="-2px",n.insertBefore(K,n.firstChild),q.style.paddingRight=
-18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=K&&null!=K.parentNode&&(K.parentNode.removeChild(K),q.style.paddingRight=18*n.childNodes.length+"px")})):null==D&&(D=t.cloneNode(!1),D.setAttribute("src",Editor.saveImage),D.setAttribute("title",mxResources.get("save")),n.insertBefore(D,n.firstChild),mxEvent.addListener(D,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-D||b.isModified()||(q.style.paddingRight=18*n.childNodes.length+"px",D.parentNode.removeChild(D),D=null)});mxEvent.consume(d)})),q.style.paddingRight=18*n.childNodes.length+"px")}),J=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
-w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;
+function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<
+g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
+"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var E=this.editor.graph,K=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K),K=t.cloneNode(!1),K.setAttribute("src",Editor.spinImage),K.setAttribute("title",mxResources.get("saving")),K.style.cursor="default",K.style.marginRight="2px",K.style.marginTop="-2px",n.insertBefore(K,n.firstChild),m.style.paddingRight=
+18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=K&&null!=K.parentNode&&(K.parentNode.removeChild(K),m.style.paddingRight=18*n.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),n.insertBefore(C,n.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+C||b.isModified()||(m.style.paddingRight=18*n.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*n.childNodes.length+"px")}),J=mxUtils.bind(this,function(b,d,e,g){b=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=E.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(b),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=E.getSelectionCells(),c=E.view.getBounds(d),e=E.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=E.view.translate.x;
c.y-=E.view.translate.y;J(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&
-(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,A(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
-"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,p,q,n,u,v){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,p,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
-JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(la){}else if("mxfile"==g.documentElement.nodeName)try{for(var p=g.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),n=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,n.width,n.height),b)}t=!0}catch(la){null!=window.console&&console.log("error in drop handler:",la)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(v,function(b){x(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
-k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));n.insertBefore(g,n.firstChild);mxEvent.addListener(g,"click",A);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(b)})),n.insertBefore(g,n.firstChild))}q.appendChild(n);q.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
+(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
+"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,p,q,n,u,x){if(null!=d&&"image/"==e.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,p,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,t=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();v=!0}catch(la){}else if("mxfile"==g.documentElement.nodeName)try{for(var p=g.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),n=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,n.width,n.height),b)}v=!0}catch(la){null!=window.console&&console.log("error in drop handler:",la)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=x&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(x,function(b){t(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));n.insertBefore(g,n.firstChild);mxEvent.addListener(g,"click",B);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),n.insertBefore(g,n.firstChild))}m.appendChild(n);m.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.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="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-"#2a2a2a",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";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
+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.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";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",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(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,
mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position=
"absolute";b.style.overflow="hidden";var c=document.createElement("a");c.className="geTitle";c.style.color="#DF6C0C";c.style.fontWeight="bold";c.style.height="100%";c.style.paddingTop="9px";c.innerHTML="<span>+</span>";var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,
-"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,p,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,
+"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,q,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,
b.columnNumber,b,"INFO")}catch(K){}if(null!=f||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){n=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=p?p:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,
-2)?q.substring(45,q.lastIndexOf("%26ex")):q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=k?null:null!=q?q:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){p="#U"==p.substring(0,
+2)?p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,
function(){var c=f.value,e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?
-n=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?n=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(n=mxUtils.htmlEntities(f)))}var u=p=null;null!=f&&null!=f.helpLink&&(p=mxResources.get("help"),u=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,n,l,e,m,null,null,p,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
-null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,p);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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:"+
+n=""==f.message&&null!=f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?n=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(n=mxUtils.htmlEntities(f)))}var u=q=null;null!=f&&null!=f.helpLink&&(q=mxResources.get("help"),u=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(c,n,l,e,m,null,null,q,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,q){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();
+null!=c&&c()},function(){d();null!=e&&e()},g,k,null,null,null,null,f);this.showDialog(b.container,340,46+f,!0,q);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);
d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");
-l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var q=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);q()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),q(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,
+l.setAttribute("type","checkbox");l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,
"tEXt","mxfile",encodeURIComponent(c))),0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,
-k,p){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(f?parseInt(f[2],10):!1)?!1:p}if(p||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));p?d.download=c:d.setAttribute("target",
-"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,p){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=p?"&base64="+p:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
-function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),F=0;n<t;++F,++n)x[F]=d[n].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,p,n,t){p=null!=p?p:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(p);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
+k,q){"text/xml"!=e||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
+null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(f?parseInt(f[2],10):!1)?!1:q}if(q||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));q?d.download=c:d.setAttribute("target",
+"_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,q){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=q?"&base64="+q:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=
+function(b,c){c=c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),D=0;n<t;++D,++n)x[D]=d[n].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,q,n,t){q=null!=q?q:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(q);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(K){this.handleError(K)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,n,null,1<k,d,b,e,g);p=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,420,p,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
+d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(K){this.handleError(K)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,n,null,1<k,d,b,e,g);q=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,420,q,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=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(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){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=
@@ -3473,242 +3474,246 @@ this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExp
this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.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(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,
null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=
-function(b,c,e,g,k,p,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){p=null!=p?p:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=g)try{this.exportFile(g,b,p,!0,d,e)}catch(K){this.handleError(K)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,p,!0,d,e)}catch(K){this.handleError(K)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,f,g,p,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,420,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,p){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,p,n,t,y,x,F,D,E,K){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=F?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,F,D);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg";K=null!=K?K:mxUtils.bind(this,function(b){this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));K(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);
-var u=mxUtils.bind(this,function(b){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});E?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(T){this.handleError(T)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,p,n){return this.addCheckbox(b,e,g,k,p,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,p,n,t){p=null!=p?p:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",
-n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");p&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),
+function(b,c,e,g,k,q,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){q=null!=q?q:"pdf"==c?"application/pdf":
+"image/"+c;if(null!=g)try{this.exportFile(g,b,q,!0,d,e)}catch(K){this.handleError(K)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,q,!0,d,e)}catch(K){this.handleError(K)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
+mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,f,g,q,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,420,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,q){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,q,n,t,y,x,D,C,E,K){if(this.spinner.spin(document.body,
+mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=D?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,D,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg";K=null!=K?K:mxUtils.bind(this,function(b){this.isLocalFileSave()||
+b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var p=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));K(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);
+var u=mxUtils.bind(this,function(b){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,p,this.thumbImageCache)):p(b)});E?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,q,n){return this.addCheckbox(b,e,g,k,q,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,q,n,t){q=null!=q?q:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",
+n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");q&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),
f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);
mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?
"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&
(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width=
-"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,p,n){n=null!=n?n:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&
-n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),p&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,g,k,p,n,t,y,x){y=this.createUrlParameters(b,c,e,g,k,p,y);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),
+"22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,q,n){n=null!=n?n:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&
+n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),q&&n.push("layers=1"),this.editor.graph.foldingEnabled&&n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,g,k,q,n,t,y,x){y=this.createUrlParameters(b,c,e,g,k,q,y);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),
t||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(y.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,p,n,t,y,x,F,D){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
-d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=F&&0<F.length&&(d.edit=F);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";D(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,q,n,t,y,x,D,C){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),
+d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=D&&0<D.length&&(d.edit=D);null!=b?d.url=b:d.xml=this.getFileData(!0,null,null,null,null,!n);c='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=
-document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(q);
-mxUtils.br(l);l.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));l.appendChild(q);var n=this.getCurrentFile();null==e&&null!=n&&n.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.style.cursor="pointer",mxUtils.write(q,mxResources.get("share")),l.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked",
-"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),D=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var K=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
-l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("tags"),!0),A=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,A),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&A.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
-mxUtils.bind(this,function(){g(k.checked?e:null,D.checked,E.value,t.getTarget(),t.getColor(),K.checked,L.checked,H.checked,J.checked,A.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,p){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));
-m.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));q.style.marginTop="12px";q.className="geBtn";m.appendChild(q);d.appendChild(m);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("check"));m.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
+document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);
+mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var n=this.getCurrentFile();null==e&&null!=n&&n.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked",
+"checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";d.appendChild(E);var K=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),
+l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),M=this.addEditButton(d,B),P=M.getEditInput();P.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&B.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,
+mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,E.value,t.getTarget(),t.getColor(),K.checked,L.checked,H.checked,J.checked,B.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,q){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));
+m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight=
-"16px",n.style.marginBottom="10px",n.value="100%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var K=this.addLinkSection(d,p);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
-mxResources.get("lightbox"),!0,null,null,!p),J=this.addEditButton(d,H),A=J.getEditInput();p&&(A.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=A.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=A.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
-A.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(K.getTarget(),K.getColor(),null==L?!0:L.checked,H.checked,J.getLink(),M.checked,null!=n?n.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
+"16px",n.style.marginBottom="10px",n.value="100%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var K=this.addLinkSection(d,q);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,
+mxResources.get("lightbox"),!0,null,null,!q),J=this.addEditButton(d,H),B=J.getEditInput();q&&(B.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=B.style.marginLeft;M.style.marginTop="8px";var P=this.addCheckbox(d,mxResources.get("tags"),!0);P.style.marginLeft=B.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),
+B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(K.getTarget(),K.getColor(),null==L?!0:L.checked,H.checked,J.getLink(),M.checked,null!=n?n.value:null,null!=t?t.value:null,P.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);
null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.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:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+
-":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var q=this.addCheckbox(d,
-mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!q.checked,null!=n?n.checked:!1,null!=
-t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,p,n,t,y){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=
-document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||"0";d.appendChild(u);mxUtils.br(d);var v=this.addCheckbox(d,mxResources.get("selectionOnly"),
-!1,f.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var A=document.createElement("select");A.style.marginTop="16px";A.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
-b[m]);A.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(A),mxUtils.br(d),l+=26,mxEvent.addListener(A,"change",function(){"selectionOnly"==A.value&&(v.checked=!0)})):p&&(d.appendChild(J),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(v,"change",function(){v.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display=
-"none",l-=30):(A.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(v,"change",function(){A.value=v.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),Q=document.createElement("input");Q.style.marginTop="16px";Q.style.marginRight="8px";
-Q.setAttribute("type","checkbox");J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");c&&(d.appendChild(Q),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),d.appendChild(J),mxUtils.write(d,mxResources.get("embedFonts")),mxUtils.br(d),l+=60);var ga=null;if("png"==t||"jpeg"==t)ga=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),l+=30;var G=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);G.style.marginBottom="16px";var C=document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));C.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
-mxResources.get("openInNewWindow"));C.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));C.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(C),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=q.value;k(q.value,P.checked,!v.checked,N.checked,G.checked,Q.checked,u.value,J.checked,!1,C.value,
-null!=ga?ga.checked:null,null!=T?T.checked:null,A.value,J.checked)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),E=this.addEditButton(d,t),K=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=K.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
-(L&&H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,q.checked,n.checked,t.checked,E.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(b,c,e,g,k,p,n,t){function d(d){var c=" ",m="";g&&(c=" 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!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",m+=
-"cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),
-null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,p,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";g&&(q="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"+(k?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),d.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!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,
+mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=n?n.checked:!1,null!=
+t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,e,g,k,q,n,t,y){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var p=
+document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";d.appendChild(p);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";d.appendChild(v);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("selectionOnly"),
+!1,f.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",
+b[m]);B.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):q&&(d.appendChild(J),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display=
+"none",l-=30):(B.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),R=document.createElement("input");R.style.marginTop="16px";R.style.marginRight="8px";
+R.setAttribute("type","checkbox");J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||R.setAttribute("disabled","disabled");c&&(d.appendChild(R),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),d.appendChild(J),mxUtils.write(d,mxResources.get("embedFonts")),mxUtils.br(d),l+=60);var ba=null;if("png"==t||"jpeg"==t)ba=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),l+=30;var F=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);F.style.marginBottom="16px";var I=document.createElement("select");I.style.maxWidth="260px";I.style.marginLeft="8px";I.style.marginRight="10px";I.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
+mxResources.get("openInNewWindow"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));I.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(I),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=p.value;k(p.value,P.checked,!u.checked,N.checked,F.checked,R.checked,v.value,J.checked,!1,I.value,
+null!=ba?ba.checked:null,null!=V?V.checked:null,B.value,J.checked)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),E=this.addEditButton(d,t),K=E.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=K.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
+(L&&H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,t.checked,E.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(b,c,e,g,k,q,n,t){function d(d){var c=" ",m="";g&&(c=" 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!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",m+=
+"cursor:pointer;");b&&(m+="max-width:100%;");var p="";e&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+d+'"'+p+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),
+null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,q,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var p=" ",t="";g&&(p="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"+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+p+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),d.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!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(b/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(b/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(b/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(b/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var d=null;if("diagram"==b.nodeName)d=
-b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(p){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
+b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(q){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
-!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var q=this.pages[0];this.currentPage==q?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=q.viewState&&null!=q.viewState&&d.setBackgroundImage(q.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?q.getName():"pagenumber"==b?1:m.apply(this,
-arguments)};document.body.appendChild(d.container);d.model.setRoot(q.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
-c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(F){null!=c&&c(F)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,p,n,t,y,x,F,D,E){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);p=c.getSvg(n,x,F,null,null,p,null,null,null,c.shadowVisible||D,null,E,"diagram");(c.shadowVisible||D)&&c.addSvgShadow(p);null!=b&&p.setAttribute("content",b);null!=e&&p.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
-"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(p);if(null!=k)this.embedFonts(p,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(p)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,
-function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(q){c(b)}}))}catch(l){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,e,g,k,p,n,t,y,x,F,D,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):
-null,y,null==this.pages||0==this.pages.length,F)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,p,n,x,D,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,p,n){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();
-try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!p){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&
-""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<q.length){p=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[L]=q[u].getAttribute("id");var J=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",
-[J+1]));f.model.execute(new ChangePage(this,H,H,J,!0));p.push(H)}this.updatePageLinks(b,p)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(A){if(k)throw A;this.handleError(A)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,
+!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&null!=p.viewState&&d.setBackgroundImage(p.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,
+arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(E){null!=c&&c(E)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
+c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,q,n,t,y,x,D,C,E){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);q=c.getSvg(n,x,D,null,null,q,null,null,null,c.shadowVisible||C,null,E,"diagram");(c.shadowVisible||C)&&c.addSvgShadow(q);null!=b&&q.setAttribute("content",b);null!=e&&q.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(q);if(null!=k)this.embedFonts(q,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(q)};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,
+function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};EditorUi.prototype.exportImage=function(b,c,e,g,k,q,n,t,y,x,D,C,E){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):
+null,y,null==this.pages||0==this.pages.length,D)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,q,n,x,C,E)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,q,n){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();
+try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length&&!q){if(m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(b[p[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=p[0].getAttribute("name");null!=t&&
+""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<p.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),g=!1,u=1);for(;u<p.length;u++){var L=p[u].getAttribute("id");p[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(p[u]));b[L]=p[u].getAttribute("id");var J=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",
+[J+1]));f.model.execute(new ChangePage(this,H,H,J,!0));q.push(H)}this.updatePageLinks(b,q)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;this.handleError(B)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,
c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,n=0;n<g.length;n++)f=g[n].getAttribute("href"),null!=f&&(g[n].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(b,
e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c=
"data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+
-1).toUpperCase();else{var m=g.lastIndexOf("/");0<=m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(D){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));
+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));
p.responseType="blob";this.addRemoteServiceSecurityCheck(p);null!=k&&p.setRequestHeader("x-convert-custom",k);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var b=p.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(K){e(K)}else try{""==p.responseType||"text"==p.responseType?
-e({message:p.responseText}):(d=new FileReader,d.onload=function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(K){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(D){e(D)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=
-e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(m){e(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=
+e({message:p.responseText}):(d=new FileReader,d.onload=function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(K){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(b,c,e){e=null!=
+e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(p){e(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=
!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(m){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(m){null!=window.console&&console.error(m),e(m)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=
+function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(p){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(p){null!=window.console&&console.error(p),e(p)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,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",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",
c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=b.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(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),
-f=parseFloat(k[2]),l=parseFloat(k[3])}catch(D){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(D){g(D)}})}catch(u){g(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&
+f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&
15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),
0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");
-0<p.length&&(b=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}e(d.result,b,f)}catch(A){g(A)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=
-function(b,c,e,g,k,p,n,t){p=null!=p?p:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=
-this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,p,!0,t)}if("data:image/png;base64,"==b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,p,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,
-!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,p,!0,t);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);
+0<p.length&&(b=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}e(d.result,b,f)}catch(B){g(B)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=
+function(b,c,e,g,k,n,t,v){n=null!=n?n:!0;t=null!=t?t:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=
+this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,v)}if("data:image/png;base64,"==b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,
+!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,v);if(0<l.length)return l}catch(E){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),t,this.maxImageSize);
else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":
-"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,e,p,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,p,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;
+"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,c,e,n,null,v);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,v))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;
d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=
m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",
d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,
function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(b,d){StorageFile.listFiles(this,"F",b,d)});window.openBrowserFile=mxUtils.bind(this,function(b,d,c){StorageFile.getFileContent(this,b,d,c)});window.deleteBrowserFile=mxUtils.bind(this,
function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,
0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?
-JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,
-function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,p,n,t,y,x,F,D){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):d=this.importXml(b,
-e,g,x,null,null!=D?mxEvent.isControlDown(D):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=F?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=D?mxEvent.isControlDown(D):null),y=!0)),y||(c=this.editor.graph,F=b.indexOf(";"),0<F&&(b=b.substring(0,F)+b.substring(b.indexOf(",",F+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),n)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,
-l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=D?mxEvent.isControlDown(D):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,p,n,t,y,x,F,D,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=b)for(var m=F||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,p,d,D,E)}catch(Y){return this.handleError(Y),null}});p=null!=p?p:mxUtils.bind(this,function(b){l.setSelectionCells(b)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],A=mxUtils.bind(this,function(b,d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}p(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var p=b[d];if(null!=p){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(p))if("image/"==p.type.substring(0,
-6))if("image/svg"==p.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=D?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?A(d,
-mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],n=f.getAttribute("width"),u=f.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+n+" "+u);else if(isNaN(n)||isNaN(u)){var A=x.split(" ");3<A.length&&(n=parseFloat(A[2]),u=parseFloat(A[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));
-var N=Math.min(1,Math.min(g/Math.max(1,n)),g/Math.max(1,u)),D=k(q,p.type,c+d*m,e+d*m,Math.max(1,Math.round(n*N)),Math.max(1,Math.round(u*N)),p.name);if(isNaN(n)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){n=Math.max(1,y.width);u=Math.max(1,y.height);D[0].geometry.width=n;D[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+n+" "+u);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",
-q,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ea){}return null})):A(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var y=D?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var B=new Image;B.src=b.target.result;A(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,B.width,B.height,p.name)}));u=!0}}u||(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(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){A(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,F)?Math.min(1,Math.min(g/
-l,g/n)):1;return k(b,p.type,c+d*m,e+d*m,Math.round(l*q),Math.round(n*q),p.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,g,F,p.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,function(){return b})},p)});/(\.v(dx|sdx?))($|\?)/i.test(p.name)||/(\.vs(x|sx?))($|\?)/i.test(p.name)?k(null,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,
-function(){return b})},p):"image"==p.type.substring(0,5)||"application/pdf"==p.type?q.readAsDataURL(p):q.readAsText(p)}})(y)});if(l){l=[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?
+JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,k,l=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,k=d))});0<g?k.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):l||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,t,v,y,x,D,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,t)):d=this.importXml(b,
+e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=v&&v(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,D=b.indexOf(";"),0<D&&(b=b.substring(0,D)+b.substring(b.indexOf(",",D+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=v&&v(null))}),t)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,
+l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);v(f)}))):/(\.v(sd|dx))($|\?)/i.test(t)||/(\.vs(s|x))($|\?)/i.test(t)||(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==v||v(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,t,v,y,x,D,C,E){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&
+null!=b)for(var m=D||this.resampleThreshold,p=0;p<b.length;p++)if("image/"==b[p].type.substring(0,6)&&b[p].size>m){l=!0;break}var q=mxUtils.bind(this,function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,k,l,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,l)),null):this.importFile(b,c,e,f,g,k,l,m,p,d,C,E)}catch(oa){return this.handleError(oa),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=b.length,q=p,u=[],B=mxUtils.bind(this,function(b,d){u[b]=d;if(0==--q){this.spinner.stop();if(null!=v)v(u);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var f=u[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<p;y++)mxUtils.bind(this,function(d){var p=b[d];if(null!=p){var n=new FileReader;n.onload=mxUtils.bind(this,function(b){if(null==t||t(p))if("image/"==p.type.substring(0,
+6))if("image/svg"==p.type.substring(0,9)){var n=Graph.clipSvgDataUri(b.target.result),q=n.indexOf(","),u=decodeURIComponent(escape(atob(n.substring(q+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?B(d,
+mxUtils.bind(this,function(){try{if(n.substring(0,q+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],t=f.getAttribute("width"),x=f.getAttribute("height"),t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+t+" "+x);else if(isNaN(t)||isNaN(x)){var B=u.split(" ");3<B.length&&(t=parseFloat(B[2]),x=parseFloat(B[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));
+var N=Math.min(1,Math.min(g/Math.max(1,t)),g/Math.max(1,x)),C=k(n,p.type,c+d*m,e+d*m,Math.max(1,Math.round(t*N)),Math.max(1,Math.round(x*N)),p.name);if(isNaN(t)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){t=Math.max(1,y.width);x=Math.max(1,y.height);C[0].geometry.width=t;C[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+t+" "+x);n=Editor.createSvgDataUri(mxUtils.getXml(f));var b=n.indexOf(";");0<b&&(n=n.substring(0,b)+n.substring(n.indexOf(",",b+1)));l.setCellStyles("image",
+n,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(ea){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var A=new Image;A.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,A.width,A.height,p.name)}));u=!0}}u||(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(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,D)?Math.min(1,Math.min(g/
+l,g/n)):1;return k(b,p.type,c+d*m,e+d*m,Math.round(l*q),Math.round(n*q),p.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,g,D,p.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=b.target.result,k(n,p.type,c+d*m,e+d*m,240,160,p.name,function(b){B(d,function(){return b})},p)});/(\.v(dx|sdx?))($|\?)/i.test(p.name)||/(\.vs(x|sx?))($|\?)/i.test(p.name)?k(null,p.type,c+d*m,e+d*m,240,160,p.name,function(b){B(d,
+function(){return b})},p):"image"==p.type.substring(0,5)||"application/pdf"==p.type?n.readAsDataURL(p):n.readAsText(p)}})(y)});if(l){l=[];for(p=0;p<b.length;p++)l.push(b[p]);b=l;this.confirmImageResize(function(b){f=b;q()},y)}else q()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?
f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){f(b,!0)},function(b){f(b,!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):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,
-e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,p,n){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);
-if(g&&this.isResampleImageSize(null!=n?n:c.length,p))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(J){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
-function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(m){if(null!=e)e(m);else throw m;}};var g=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:
-"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==
-g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);
-e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},
-function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};
-c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var m=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));m.apply(this,
+e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,t){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);
+if(g&&this.isResampleImageSize(null!=t?t:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),p=Math.round(f/l),q=document.createElement("canvas");q.width=m;q.height=p;q.getContext("2d").drawImage(b,0,0,m,p);var u=q.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=p;var H=L.toDataURL();u!==H&&(c=u,d=m,f=p)}}}catch(J){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
+function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(p){if(null!=e)e(p);else throw p;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&"1"!=urlParams.embedInline&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:
+"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==
+g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);
+e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generateMermaidImage(e,g.config,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},
+function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(V){b.handleError(V)}};
+c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));p.apply(this,
arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();
-break}}}));var p=c.getBackgroundImageObject;c.getBackgroundImageObject=function(d,c){var e=p.apply(this,arguments);if(null!=e&&null!=e.originalSrc)if(!c)e={src:e.originalSrc};else if(c&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var f=this.stylesheet;this.stylesheet=this.getDefaultStylesheet();e=b.createImageForPageLink(e.originalSrc);this.stylesheet=f}return e};var n=this.clearDefaultStyle;this.clearDefaultStyle=function(){n.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 t=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return t.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;
+break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(d,c){var e=n.apply(this,arguments);if(null!=e&&null!=e.originalSrc)if(!c)e={src:e.originalSrc};else if(c&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var f=this.stylesheet;this.stylesheet=this.getDefaultStylesheet();e=b.createImageForPageLink(e.originalSrc);this.stylesheet=f}return e};var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.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 v=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;
d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?
-x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var F=c.getExportVariables;c.getExportVariables=function(){var d=F.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=
-b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var D=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};var E=c.labelLinkClicked;
+x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var D=c.getExportVariables;c.getExportVariables=function(){var d=D.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=
+b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var E=c.labelLinkClicked;
c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))E.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var K=this.actions.get("print");K.setEnabled(!mxClient.IS_IOS||
!navigator.standalone);K.visible=K.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.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();
-b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");
+b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,k){c.insertImage(b,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");
/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,
"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));this.isSettingsEnabled()&&(K=this.editor.graph.view,K.setUnit(mxSettings.getUnit()),K.addListener("unitChanged",function(b,d){mxSettings.setUnit(d.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,
K.unit),this.refresh());if("1"==urlParams.styledev){K=document.getElementById("geFooter");null!=K&&(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)})),K.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
this.styleInput?!0:L.apply(this,arguments)}}K=document.getElementById("geInfo");null!=K&&K.parentNode.removeChild(K);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,
-g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=
-c.sanitizeHtml(m);var p=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=
-m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",
-mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=
+null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,k=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=g=null),this.importFiles(b.dataTransfer.files,
+g,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=g=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=
+c.sanitizeHtml(m);var p=null,e=d.getElementsByTagName("img");null!=e&&1==e.length?(m=e[0].getAttribute("src"),null==m&&(m=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(p=!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,k,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=
+m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,g,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),g,k,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",
+mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,k){b.insertImage(d,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=
this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML="&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck",
"false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",
c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),
this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,
-!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);mxSettings.settings.sketchMode=b;mxSettings.save();this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(b){Editor.pagesVisible!=
-b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.doSetSketchMode=function(b){if(Editor.sketchMode!=b){var d=this.editor.graph;Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=20;d.defaultVertexStyle={pointerEvents:"0",fontSize:"20"};d.defaultEdgeStyle={fontSize:"16",edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
-endArrow:"open",endSize:"14",startSize:"14"};b&&(d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.hachureGap="4",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing="8",this.menus.defaultFonts=
-[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(this.menus.defaultFonts));this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=
-mxUtils.clone(d.defaultEdgeStyle);Graph.prototype.defaultVertexStyle=d.defaultVertexStyle;Graph.prototype.defaultEdgeStyle=d.defaultEdgeStyle;this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=
-function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};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(b){b.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(b,c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);
-else{var d=c.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(b,c){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(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){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(b,c){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(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));
-this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+
-1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=
-f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,
-d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=
-d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),
-k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var n=decodeURIComponent(l);this.isCompatibleString(n)&&(k=!0,l=n)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),
-null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var q=f.lastIndexOf("%3E");0<=q&&q<
-f.length-3&&(f=f.substring(0,q+3))}catch(D){}try{l=d.getElementsByTagName("span"),n=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(n)&&(k=!0,f=n)}catch(D){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(D){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=0}}catch(D){this.handleError(D)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=
-null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&
-(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?
-c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),
-null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+
-"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";
-k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,
-e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&
-!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();
-this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),
-mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;
-d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==
-c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)&&null!=d&&d.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(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.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 b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),
-this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),
-d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&
-(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(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);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,c,e,g){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,
-b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(g)try{var d=this.editor.graph;d.setGridEnabled(!1);d.pageVisible=!1;var f=d.model.cells,k;for(k in f){var l=f[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
-this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,e=!1,g=null,k=mxUtils.bind(this,function(b,d){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,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==
-b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(qa){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(V){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):
-k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var p=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(p.container,
-300,80,!0,!1);p.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):
-null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(V){n.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&
-!k.templatesOnly&&null!=k.callback){var A=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=A?A.id:null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,
-u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=
-d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",
-[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==k.action){var P=
-this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:P,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,T):
-this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var Q=this.editor.graph,ga=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");d.format=k.format;d.message=k;d.data=b;d.xml=N;n.postMessage(JSON.stringify(d),
-"*")}),G=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);ga(b)}),C=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var B=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=C){var b=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());
-for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==C){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);Q.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=Q.model,f=e.getChildCells(e.getRoot()),g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){G(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){G(null)}),null,null,k.scale,k.transparent,k.shadow,null,Q,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(N),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(B)},0):B()):B()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=C?"&pageId="+C:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+
-encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?ga("data:image/png;base64,"+b.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else B=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=
-this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,
-function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);n.postMessage(JSON.stringify(b),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):
-k.spin))this.editor.graph.setEnabled(!1),d=this.editor.graph.getSvg(d,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme),(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):c(mxUtils.getXml(b))}));return}n.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&
-0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(B)},0):B()):B();return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&
-(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(V){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var U=this.getCurrentFile();
-null!=U&&(q=l(k.xml),null!=q&&""!=q&&U.mergeFile(new LocalFile(this,q),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),
-"*");return}}catch(V){this.handleError(V)}}var I=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ba=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(ja){this.handleError(ja)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=I();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=I();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),
-"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",
-d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;n.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){ba(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===
-typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&ba(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){ba(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==
-k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),ba(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){ba(I(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);
-n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g=
-"1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&
-(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",
-e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
-":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=
-b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g=[],k={};if(0<d.length){var n={},t=null,x=null,F=null,D=null,E=null,K=null,L="whiteSpace=wrap;html=1;",H=null,J=null,A="",M="auto",P="auto",T=null,N=null,Q=40,ga=40,G=100,C=0,B=this.editor.graph;B.getGraphBounds();for(var U=function(){null!=c?c(va):(B.setSelectionCells(va),B.scrollCellToVisible(B.getSelectionCell()))},
-I=B.getFreeInsertPoint(),ba=I.x,V=I.y,I=V,qa=null,ma="auto",J=null,ja=[],na=null,Y=null,ka=0;ka<d.length&&"#"==d[ka].charAt(0);){b=d[ka];for(ka++;ka<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ka].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ka].substring(1)),ka++;if("#"!=b.charAt(1)){var la=b.indexOf(":");if(0<la){var ca=mxUtils.trim(b.substring(1,la)),R=mxUtils.trim(b.substring(la+1));"label"==ca?qa=B.sanitizeHtml(R):"labelname"==ca&&0<R.length&&"-"!=R?E=R:"labels"==ca&&0<R.length&&"-"!=
-R?K=JSON.parse(R):"style"==ca?x=R:"parentstyle"==ca?L=R:"stylename"==ca&&0<R.length&&"-"!=R?D=R:"styles"==ca&&0<R.length&&"-"!=R?F=JSON.parse(R):"vars"==ca&&0<R.length&&"-"!=R?t=JSON.parse(R):"identity"==ca&&0<R.length&&"-"!=R?H=R:"parent"==ca&&0<R.length&&"-"!=R?J=R:"namespace"==ca&&0<R.length&&"-"!=R?A=R:"width"==ca?M=R:"height"==ca?P=R:"left"==ca&&0<R.length?T=R:"top"==ca&&0<R.length?N=R:"ignore"==ca?Y=R.split(","):"connect"==ca?ja.push(JSON.parse(R)):"link"==ca?na=R:"padding"==ca?C=parseFloat(R):
-"edgespacing"==ca?Q=parseFloat(R):"nodespacing"==ca?ga=parseFloat(R):"levelspacing"==ca?G=parseFloat(R):"layout"==ca&&(ma=R)}}}if(null==d[ka])throw Error(mxResources.get("invalidOrMissingFile"));for(var Z=this.editor.csvToArray(d[ka]),ca=la=null,R=[],W=0;W<Z.length;W++)H==Z[W]&&(la=W),J==Z[W]&&(ca=W),R.push(mxUtils.trim(Z[W]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==qa&&(qa="%"+R[0]+"%");if(null!=ja)for(var da=0;da<ja.length;da++)null==n[ja[da].to]&&(n[ja[da].to]={});
-H=[];for(W=ka+1;W<d.length;W++){var ia=this.editor.csvToArray(d[W]);if(null==ia){var ta=40<d[W].length?d[W].substring(0,40)+"...":d[W];throw Error(ta+" ("+W+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&H.push(ia)}B.model.beginUpdate();try{for(W=0;W<H.length;W++){var ia=H[W],S=null,ea=null!=la?A+ia[la]:null;null!=ea&&(S=B.model.getCell(ea));var d=null!=S,ha=new mxCell(qa,new mxGeometry(ba,I,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;for(var O=0;O<ia.length;O++)B.setAttributeForCell(ha,
-R[O],ia[O]);if(null!=E&&null!=K){var aa=K[ha.getAttribute(E)];null!=aa&&B.labelChanged(ha,aa)}if(null!=D&&null!=F){var ra=F[ha.getAttribute(D)];null!=ra&&(ha.style=ra)}B.setAttributeForCell(ha,"placeholders","1");ha.style=B.replacePlaceholders(ha,ha.style,t);d?(B.model.setValue(S,ha.value),B.model.setStyle(S,ha.style),0>mxUtils.indexOf(g,S)&&g.push(S),B.fireEvent(new mxEventObject("cellsInserted","cells",[S]))):B.fireEvent(new mxEventObject("cellsInserted","cells",[ha]));S=ha;if(!d)for(da=0;da<ja.length;da++)n[ja[da].to][S.getAttribute(ja[da].to)]=
-S;null!=na&&"link"!=na&&(B.setLinkForCell(S,S.getAttribute(na)),B.setAttributeForCell(S,na,null));var ua=this.editor.graph.getPreferredSizeForCell(S),J=null!=ca?B.model.getCell(A+ia[ca]):null;if(S.vertex){ta=null!=J?0:ba;ka=null!=J?0:V;null!=T&&null!=S.getAttribute(T)&&(S.geometry.x=ta+parseFloat(S.getAttribute(T)));null!=N&&null!=S.getAttribute(N)&&(S.geometry.y=ka+parseFloat(S.getAttribute(N)));var oa="@"==M.charAt(0)?S.getAttribute(M.substring(1)):null;S.geometry.width=null!=oa&&"auto"!=oa?parseFloat(S.getAttribute(M.substring(1))):
-"auto"==M||"auto"==oa?ua.width+C:parseFloat(M);var xa="@"==P.charAt(0)?S.getAttribute(P.substring(1)):null;S.geometry.height=null!=xa&&"auto"!=xa?parseFloat(xa):"auto"==P||"auto"==xa?ua.height+C:parseFloat(P);I+=S.geometry.height+ga}d?(null==k[ea]&&(k[ea]=[]),k[ea].push(S)):(e.push(S),null!=J?(J.style=B.replacePlaceholders(J,L,t),B.addCell(S,J),f.push(J)):g.push(B.addCell(S)))}for(W=0;W<f.length;W++)oa="@"==M.charAt(0)?f[W].getAttribute(M.substring(1)):null,xa="@"==P.charAt(0)?f[W].getAttribute(P.substring(1)):
-null,"auto"!=M&&"auto"!=oa||"auto"!=P&&"auto"!=xa||B.updateGroupBounds([f[W]],C,!0);for(var Aa=g.slice(),va=g.slice(),da=0;da<ja.length;da++)for(var Ha=ja[da],W=0;W<e.length;W++){var S=e[W],Ia=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(B.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=n[c.to][e[f]];if(null!=g){var k=c.label;null!=c.fromlabel&&(k=(d.getAttribute(c.fromlabel)||"")+(k||""));null!=c.sourcelabel&&(k=B.replacePlaceholders(d,
-c.sourcelabel,t)+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(k=(k||"")+B.replacePlaceholders(g,c.targetlabel,t));var l="target"==c.placeholders==!c.invert?g:b,l=null!=c.style?B.replacePlaceholders(l,c.style,t):B.createCurrentEdgeStyle(),k=B.insertEdge(null,null,k||"",c.invert?g:b,c.invert?b:g,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],p=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");
-p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=m.placeholders&&(p.value=B.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,p.value,t));if(null!=m.dx||null!=m.dy)p.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(p)}va.push(k);mxUtils.remove(c.invert?b:g,Aa)}}});Ia(S,S,Ha);if(null!=k[S.id])for(O=0;O<k[S.id].length;O++)Ia(S,k[S.id][O],Ha)}if(null!=Y)for(W=0;W<e.length;W++)for(S=e[W],O=0;O<Y.length;O++)B.setAttributeForCell(S,mxUtils.trim(Y[O]),null);if(0<
-g.length){var Ca=new mxParallelEdgeLayout(B);Ca.spacing=Q;Ca.checkOverlap=!0;var Da=function(){0<Ca.spacing&&Ca.execute(B.getDefaultParent());for(var b=0;b<g.length;b++){var d=B.getCellGeometry(g[b]);d.x=Math.round(B.snap(d.x));d.y=Math.round(B.snap(d.y));"auto"==M&&(d.width=Math.round(B.snap(d.width)));"auto"==P&&(d.height=Math.round(B.snap(d.height)))}};if("["==ma.charAt(0)){var Ja=U;B.view.validate();this.executeLayoutList(JSON.parse(ma),function(){Da();Ja()});U=null}else if("circle"==ma){var ya=
-new mxCircleLayout(B);ya.disableEdgeStyle=!1;ya.resetEdges=!1;var Ea=ya.isVertexIgnored;ya.isVertexIgnored=function(b){return Ea.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){ya.execute(B.getDefaultParent());Da()},!0,U);U=null}else if("horizontaltree"==ma||"verticaltree"==ma||"auto"==ma&&va.length==2*g.length-1&&1==Aa.length){B.view.validate();var za=new mxCompactTreeLayout(B,"horizontaltree"==ma);za.levelDistance=ga;za.edgeRouting=!1;za.resetEdges=!1;this.executeLayout(function(){za.execute(B.getDefaultParent(),
-0<Aa.length?Aa[0]:null)},!0,U);U=null}else if("horizontalflow"==ma||"verticalflow"==ma||"auto"==ma&&1==Aa.length){B.view.validate();var X=new mxHierarchicalLayout(B,"horizontalflow"==ma?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);X.intraCellSpacing=ga;X.parallelEdgeSpacing=Q;X.interRankCellSpacing=G;X.disableEdgeStyle=!1;this.executeLayout(function(){X.execute(B.getDefaultParent(),va);B.moveCells(va,ba,V)},!0,U);U=null}else if("organic"==ma||"auto"==ma&&va.length>g.length){B.view.validate();
-var wa=new mxFastOrganicLayout(B);wa.forceConstant=3*ga;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Na=wa.isVertexIgnored;wa.isVertexIgnored=function(b){return Na.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){wa.execute(B.getDefaultParent());Da()},!0,U);U=null}}this.hideDialog()}finally{B.model.endUpdate()}null!=U&&U()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c=
-"?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+
-urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&
-"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);
-this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);
-this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),
-g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=
-this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,n)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),p=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA)if(b.hideDialog(),
-"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+p+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,
-null==g||"none"==g,!0,!1,!1,n,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+
-" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);null==urlParams.rough&&(mxSettings.settings.sketchMode=b,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
+function(b){Editor.pagesVisible!=b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setInlineFullscreen=function(b){Editor.inlineFullscreen!=b&&(Editor.inlineFullscreen=b,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(b){if(Editor.sketchMode!=b){var d=this.editor.graph;Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=b?20:16;d.defaultVertexStyle={pointerEvents:"0",fontSize:this.menus.defaultFontSize};d.defaultEdgeStyle={fontSize:this.menus.defaultFontSize-4,edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",
+orthogonalLoop:"1",endArrow:"open",endSize:"14",startSize:"14"};b&&(d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.hachureGap="4",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
+"8",this.menus.defaultFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)},{fontFamily:"Rock Salt",fontUrl:"https://fonts.googleapis.com/css?family=Rock+Salt"},{fontFamily:"Permanent Marker",fontUrl:"https://fonts.googleapis.com/css?family=Permanent+Marker"}].concat(this.menus.defaultFonts));this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);
+d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);Graph.prototype.defaultVertexStyle=d.defaultVertexStyle;Graph.prototype.defaultEdgeStyle=d.defaultEdgeStyle;this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(b){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(b)){var c=b.indexOf(",");0<c&&(d=this.getPageById(b.substring(c+1)),d=null!=d?d.getName():mxResources.get("pageNotFound"))}else"data:"==b.substring(0,5)&&(d=mxResources.get("action"));return d};
+EditorUi.prototype.handleCustomLink=function(b){if(Graph.isPageLink(b)){var d=b.indexOf(",");if(b=this.getPageById(b.substring(d+1)))this.selectPage(b);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(b)};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(b){b.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(b,
+c){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);else{var d=c.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(b,c){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(b,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.addListener("gridColorChanged",mxUtils.bind(this,function(b,c){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(b,c){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(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();
+var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(m){this.handleError(m)}};
+EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));
+mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=
+function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,k,k),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,
+b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+k,f.y+k,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=
+c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),f="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,l))}k=d.getElementsByTagName("span");if(null!=
+k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))e=k[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),mxEvent.consume(b));else{f=
+f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var n=f.lastIndexOf("%3E");0<=n&&n<f.length-3&&(f=f.substring(0,n+3))}catch(C){}try{k=d.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(l=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=
+0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(d=
+this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);
+if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=this.editor.graph.sanitizeHtml(c),e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,
+"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):
+window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var d=0,c=0,e,g;if(null==b){g=document.body;var k=document.documentElement;e=(g.clientWidth||k.clientWidth)-3;g=Math.max(g.clientHeight||0,k.clientHeight)-3}else d=b.offsetTop,c=b.offsetLeft,e=b.clientWidth,g=b.clientHeight;k=document.createElement("div");
+k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=d+"px";k.style.left=c+"px";k.style.width=Math.max(0,e-3)+"px";k.style.height=Math.max(0,g-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);
+b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,k){if(null!=c&&0<c.length){!this.useCanvasForExport&&/(\.png)$/i.test(c)?c=c.substring(0,c.length-4)+".drawio":/(\.pdf)$/i.test(c)&&(c=c.substring(0,c.length-4)+".drawio");var d=mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+
+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,
+mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,
+c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==
+b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=
+0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),
+f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)&&null!=d&&d.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(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.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 b={};if(null!=this.pages)for(var c=
+0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);d(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&
+(d(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=e.model.getChildCount(b),g=0;g<f;g++)this.addBasenamesForCell(e.model.getChildAt(b,g),c)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=
+b?"":"none";this.editor.graph.setEnabled(b);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=b?"":"hidden",this.ruler.vRuler.container.style.visibility=b?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden");b||(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 b=!1;this.installMessageHandler(mxUtils.bind(this,function(d,c,e,g){b||(b=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
+if(null==d||0==d.length)d=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,d,{}));this.mode=App.MODE_EMBED;this.setFileData(d);if(g)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var k=f.model.cells,l;for(l in k){var m=k[l];null!=m&&null!=m.style&&(m.style+=";sketch=1;"+(-1==m.style.indexOf("fontFamily=")||-1<m.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=e?e:!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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(){this.getEmbeddedSvg(this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1),this.editor.graph,null,!0,mxUtils.bind(this,function(b){this.editor.modified=!1;(window.opener||window.parent).postMessage(JSON.stringify({event:"export",data:Editor.createSvgDataUri(b)}),"*")}),null,null,!0,null,1,8);this.diagramContainer.removeAttribute("data-bounds");Editor.inlineFullscreen=!1;this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);this.editor.modified=!1;this.fireEvent(new mxEventObject("editInlineStop"))};
+EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,e=!1,g=null,k=mxUtils.bind(this,function(b,d){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,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=null,m=mxUtils.bind(this,
+function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(na){}return b});if("json"==urlParams.proto){var p=!1;try{k=JSON.parse(k)}catch(fa){k=null}try{if(null==k)return;
+if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var q=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",
+value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(q.container,300,80,!0,!1);q.init();return}if("draft"==k.action){var t=m(k.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),t,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();
+n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(fa){n.postMessage(JSON.stringify({event:"draft",error:fa.toString(),
+message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var u=1==k.enableRecent,v=1==k.enableSearch,B=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var y=this.getCurrentUser(),P=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,
+function(){this.actions.get("exit").funct()}),null,null,null!=y?y.id:null,u?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,v?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(P.container,
+window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",
+[null],null,b,function(){b(null,"Network Error!")})}):null,v?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,
+function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==k.action){var V=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:V,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var N=
+null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,N):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var R=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ba=this.editor.graph,F=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();
+var d=this.createLoadMessage("export");d.format=k.format;d.message=k;d.data=b;d.xml=R;n.postMessage(JSON.stringify(d),"*")}),I=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(R)));ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,
+function(){if(null!=this.pages&&this.currentPage.getId()!=A){var b=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==A){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);ba.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(ba.container);ba.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=ba.model,f=e.getChildCells(e.getRoot()),
+g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){I(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){I(null)}),null,null,k.scale,k.transparent,k.shadow,null,ba,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(R),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(S)},0):S()):
+S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):I(null)}),mxUtils.bind(this,function(){I(null)}))}}else S=mxUtils.bind(this,function(){var b=
+this.createLoadMessage("export");b.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;
+d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);n.postMessage(JSON.stringify(b),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,k.scale,
+k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))this.editor.graph.setEnabled(!1),d=this.editor.graph.getSvg(d,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme),(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,
+mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):c(mxUtils.getXml(b))}));return}n.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(S)},0):S()):S();return}if("load"==k.action){p=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=
+k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);if(null!=k.rough){var G=Editor.sketchMode;this.doSetSketchMode(k.rough);G!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=k.dark&&(G=Editor.darkMode,this.doSetDarkMode(k.dark),G!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=k.rect&&(this.diagramContainer.style.border="2px solid #295fcc",this.diagramContainer.style.top=k.rect.top+"px",this.diagramContainer.style.left=
+k.rect.left+"px",this.diagramContainer.style.height=k.rect.height+"px",this.diagramContainer.style.width=k.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",l=mxUtils.bind(this,function(){var b=this.editor.graph,d=b.maxFitScale;b.maxFitScale=1;b.fit(20);b.maxFitScale=d;b.container.scrollTop-=20;b.container.scrollLeft-=20;this.fireEvent(new mxEventObject("editInlineStart","data",[k]))}));null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);
+null!=k.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(fa){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var X=this.getCurrentFile();null!=X&&(t=m(k.xml),null!=t&&""!=
+t&&X.mergeFile(new LocalFile(this,t),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(fa){this.handleError(fa)}}var ca=
+mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ma=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,p)}catch(oa){this.handleError(oa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=ca();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=ca();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=
+e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),
+this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;n.postMessage(JSON.stringify(m),"*")}null!=l&&l()});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){ma(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=k&&
+"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&ma(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){ma(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
+null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=m(k),ma(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){ma(ca(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,
+arguments);n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),
+"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,
+e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
+mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(b,c){for(var d=this.editor.graph,e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);
+if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g=[],k={};if(0<d.length){var n={},t=null,x=null,D=null,C=null,E=null,K=null,L="whiteSpace=wrap;html=1;",H=null,J=null,B="",M="auto",P="auto",V=null,N=null,R=40,ba=40,F=100,I=0,A=this.editor.graph;A.getGraphBounds();for(var S=function(){null!=c?c(pa):(A.setSelectionCells(pa),
+A.scrollCellToVisible(A.getSelectionCell()))},G=A.getFreeInsertPoint(),X=G.x,ca=G.y,G=ca,ma=null,fa="auto",J=null,na=[],ka=null,oa=null,Z=0;Z<d.length&&"#"==d[Z].charAt(0);){b=d[Z];for(Z++;Z<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[Z].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[Z].substring(1)),Z++;if("#"!=b.charAt(1)){var la=b.indexOf(":");if(0<la){var aa=mxUtils.trim(b.substring(1,la)),T=mxUtils.trim(b.substring(la+1));"label"==aa?ma=A.sanitizeHtml(T):"labelname"==aa&&0<T.length&&
+"-"!=T?E=T:"labels"==aa&&0<T.length&&"-"!=T?K=JSON.parse(T):"style"==aa?x=T:"parentstyle"==aa?L=T:"stylename"==aa&&0<T.length&&"-"!=T?C=T:"styles"==aa&&0<T.length&&"-"!=T?D=JSON.parse(T):"vars"==aa&&0<T.length&&"-"!=T?t=JSON.parse(T):"identity"==aa&&0<T.length&&"-"!=T?H=T:"parent"==aa&&0<T.length&&"-"!=T?J=T:"namespace"==aa&&0<T.length&&"-"!=T?B=T:"width"==aa?M=T:"height"==aa?P=T:"left"==aa&&0<T.length?V=T:"top"==aa&&0<T.length?N=T:"ignore"==aa?oa=T.split(","):"connect"==aa?na.push(JSON.parse(T)):
+"link"==aa?ka=T:"padding"==aa?I=parseFloat(T):"edgespacing"==aa?R=parseFloat(T):"nodespacing"==aa?ba=parseFloat(T):"levelspacing"==aa?F=parseFloat(T):"layout"==aa&&(fa=T)}}}if(null==d[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[Z]),aa=la=null,T=[],Q=0;Q<ra.length;Q++)H==ra[Q]&&(la=Q),J==ra[Q]&&(aa=Q),T.push(mxUtils.trim(ra[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ma&&(ma="%"+T[0]+"%");if(null!=na)for(var da=0;da<na.length;da++)null==
+n[na[da].to]&&(n[na[da].to]={});H=[];for(Q=Z+1;Q<d.length;Q++){var ia=this.editor.csvToArray(d[Q]);if(null==ia){var wa=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(wa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&H.push(ia)}A.model.beginUpdate();try{for(Q=0;Q<H.length;Q++){var ia=H[Q],U=null,ea=null!=la?B+ia[la]:null;null!=ea&&(U=A.model.getCell(ea));var d=null!=U,ha=new mxCell(ma,new mxGeometry(X,G,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;
+for(var ja=0;ja<ia.length;ja++)A.setAttributeForCell(ha,T[ja],ia[ja]);if(null!=E&&null!=K){var O=K[ha.getAttribute(E)];null!=O&&A.labelChanged(ha,O)}if(null!=C&&null!=D){var Y=D[ha.getAttribute(C)];null!=Y&&(ha.style=Y)}A.setAttributeForCell(ha,"placeholders","1");ha.style=A.replacePlaceholders(ha,ha.style,t);d?(A.model.setValue(U,ha.value),A.model.setStyle(U,ha.style),0>mxUtils.indexOf(g,U)&&g.push(U),A.fireEvent(new mxEventObject("cellsInserted","cells",[U]))):A.fireEvent(new mxEventObject("cellsInserted",
+"cells",[ha]));U=ha;if(!d)for(da=0;da<na.length;da++)n[na[da].to][U.getAttribute(na[da].to)]=U;null!=ka&&"link"!=ka&&(A.setLinkForCell(U,U.getAttribute(ka)),A.setAttributeForCell(U,ka,null));var xa=this.editor.graph.getPreferredSizeForCell(U),J=null!=aa?A.model.getCell(B+ia[aa]):null;if(U.vertex){wa=null!=J?0:X;Z=null!=J?0:ca;null!=V&&null!=U.getAttribute(V)&&(U.geometry.x=wa+parseFloat(U.getAttribute(V)));null!=N&&null!=U.getAttribute(N)&&(U.geometry.y=Z+parseFloat(U.getAttribute(N)));var ua="@"==
+M.charAt(0)?U.getAttribute(M.substring(1)):null;U.geometry.width=null!=ua&&"auto"!=ua?parseFloat(U.getAttribute(M.substring(1))):"auto"==M||"auto"==ua?xa.width+I:parseFloat(M);var sa="@"==P.charAt(0)?U.getAttribute(P.substring(1)):null;U.geometry.height=null!=sa&&"auto"!=sa?parseFloat(sa):"auto"==P||"auto"==sa?xa.height+I:parseFloat(P);G+=U.geometry.height+ba}d?(null==k[ea]&&(k[ea]=[]),k[ea].push(U)):(e.push(U),null!=J?(J.style=A.replacePlaceholders(J,L,t),A.addCell(U,J),f.push(J)):g.push(A.addCell(U)))}for(Q=
+0;Q<f.length;Q++)ua="@"==M.charAt(0)?f[Q].getAttribute(M.substring(1)):null,sa="@"==P.charAt(0)?f[Q].getAttribute(P.substring(1)):null,"auto"!=M&&"auto"!=ua||"auto"!=P&&"auto"!=sa||A.updateGroupBounds([f[Q]],I,!0);for(var va=g.slice(),pa=g.slice(),da=0;da<na.length;da++)for(var Ba=na[da],Q=0;Q<e.length;Q++){var U=e[Q],Ca=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(A.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=n[c.to][e[f]];
+if(null!=g){var k=c.label;null!=c.fromlabel&&(k=(d.getAttribute(c.fromlabel)||"")+(k||""));null!=c.sourcelabel&&(k=A.replacePlaceholders(d,c.sourcelabel,t)+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(k=(k||"")+A.replacePlaceholders(g,c.targetlabel,t));var l="target"==c.placeholders==!c.invert?g:b,l=null!=c.style?A.replacePlaceholders(l,c.style,t):A.createCurrentEdgeStyle(),k=A.insertEdge(null,null,k||"",c.invert?g:b,c.invert?b:g,l);if(null!=c.labels)for(l=
+0;l<c.labels.length;l++){var m=c.labels[l],p=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=m.placeholders&&(p.value=A.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,p.value,t));if(null!=m.dx||null!=m.dy)p.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(p)}pa.push(k);mxUtils.remove(c.invert?b:g,va)}}});Ca(U,U,Ba);if(null!=k[U.id])for(ja=0;ja<k[U.id].length;ja++)Ca(U,
+k[U.id][ja],Ba)}if(null!=oa)for(Q=0;Q<e.length;Q++)for(U=e[Q],ja=0;ja<oa.length;ja++)A.setAttributeForCell(U,mxUtils.trim(oa[ja]),null);if(0<g.length){var Ea=new mxParallelEdgeLayout(A);Ea.spacing=R;Ea.checkOverlap=!0;var Fa=function(){0<Ea.spacing&&Ea.execute(A.getDefaultParent());for(var b=0;b<g.length;b++){var d=A.getCellGeometry(g[b]);d.x=Math.round(A.snap(d.x));d.y=Math.round(A.snap(d.y));"auto"==M&&(d.width=Math.round(A.snap(d.width)));"auto"==P&&(d.height=Math.round(A.snap(d.height)))}};if("["==
+fa.charAt(0)){var Ja=S;A.view.validate();this.executeLayoutList(JSON.parse(fa),function(){Fa();Ja()});S=null}else if("circle"==fa){var za=new mxCircleLayout(A);za.disableEdgeStyle=!1;za.resetEdges=!1;var Ga=za.isVertexIgnored;za.isVertexIgnored=function(b){return Ga.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){za.execute(A.getDefaultParent());Fa()},!0,S);S=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&pa.length==2*g.length-1&&1==va.length){A.view.validate();
+var Aa=new mxCompactTreeLayout(A,"horizontaltree"==fa);Aa.levelDistance=ba;Aa.edgeRouting=!1;Aa.resetEdges=!1;this.executeLayout(function(){Aa.execute(A.getDefaultParent(),0<va.length?va[0]:null)},!0,S);S=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==va.length){A.view.validate();var W=new mxHierarchicalLayout(A,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);W.intraCellSpacing=ba;W.parallelEdgeSpacing=R;W.interRankCellSpacing=F;W.disableEdgeStyle=
+!1;this.executeLayout(function(){W.execute(A.getDefaultParent(),pa);A.moveCells(pa,X,ca)},!0,S);S=null}else if("organic"==fa||"auto"==fa&&pa.length>g.length){A.view.validate();var ya=new mxFastOrganicLayout(A);ya.forceConstant=3*ba;ya.disableEdgeStyle=!1;ya.resetEdges=!1;var Na=ya.isVertexIgnored;ya.isVertexIgnored=function(b){return Na.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){ya.execute(A.getDefaultParent());Fa()},!0,S);S=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=
+S&&S()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(b){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(b,e)&&null!=urlParams[e]&&(d+=c+e+"="+urlParams[e],c="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams[e]&&(b+=e+"="+urlParams[e],d++))}return b};EditorUi.prototype.showLinkDialog=function(b,c,e,g,k){b=new LinkDialog(this,b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prototype.getServiceCount=function(b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);
+this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);
+this.actions.get("resetView").setEnabled(c);this.actions.get("undo").setEnabled(this.canUndo()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};
+EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,
+c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&
+!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
+c&&!c.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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");
+c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,n)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),p=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&
+m*p<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+p+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==
+e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,n,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=
+this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();for(b=0;b<n.length;b++){var t=n[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));
c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,
@@ -3720,46 +3725,46 @@ arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteI
d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",
{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var d=document.createElement("iframe");d.style.display=
"none";d.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(d);var c=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,
-function(c){null==c||".scratchpad"==b&&c==this.emptyLibraryXml?d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(A){console.log(A)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(A){console.log(A)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g=
+function(c){null==c||".scratchpad"==b&&c==this.emptyLibraryXml?d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g=
{};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(d.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(c?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],c=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=
-function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(m){null!=c&&c(m)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=
+function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(p){null!=c&&c(p)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=
function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=
function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();
-f.onsuccess=function(){b(f.result)};f.onerror=c}catch(p){null!=c&&c(p)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();
+f.onsuccess=function(){b(f.result)};f.onerror=c}catch(q){null!=c&&c(q)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();
null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,
b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,n,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,n,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,n,t,v,y,x,F,D,E,K,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,v,
-y,x,F,D,E,K,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};
+return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,n,t,v,y,x,D,C,E,K,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,v,
+y,x,D,C,E,K,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};
EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,
c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k="<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=
function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=D.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==D&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;E.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(p.click(),mxEvent.consume(b)):27==b.keyCode&&(n.click(),mxEvent.consume(b)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function q(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function m(b){b.style.border="";b.removeChild(b.busyImg)}function p(c,e,g,k,n){function A(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});F.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=Q;b(c);return{pdiv:e,replies:d}}function x(e,f,g,n,t){function u(){l(D);c.addReply(x,function(b){x.id=b;c.replies.push(x);m(D);g&&g()},function(c){v();q(D);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function v(){d(x,D,function(b){u()},!0)}var A=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=p(x,c.replies,A,k+1);f?v():u()}if(n||!c.isResolved){E.style.display="none";var Q=document.createElement("div");Q.className="geCommentContainer";Q.setAttribute("data-commentId",c.id);Q.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(Q.style.backgroundColor="ghostWhite");
-var I=document.createElement("div");I.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;I.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";I.appendChild(T);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,c.user.displayName||"");T.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",c.id);f(c,
-K);T.appendChild(K);Q.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,c.content||"");Q.appendChild(I);c.isLocked&&(Q.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var F=document.createElement("ul");F.className="geCommentActionsList";I.appendChild(F);u||c.isLocked||0!=k&&!v||A(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(A(mxResources.get("edit"),
-function(){function e(){d(c,Q,function(){l(Q);c.editComment(c.content,function(){m(Q)},function(c){q(Q);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),A(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(Q);c.deleteComment(function(b){if(!0===b){b=Q.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=Q.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);m(Q);Q.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)D.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==D.getElementsByTagName("div").length?"block":"none"}},function(c){q(Q);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||A(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=N(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?x(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});Q.appendChild(I);null!=g?D.insertBefore(Q,g.nextSibling):D.appendChild(Q);for(g=0;null!=c.replies&&g<c.replies.length;g++)I=c.replies[g],I.isResolved=c.isResolved,p(I,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,Q,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return Q}}
-var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var F=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.bottom=parseInt(F)+7+"px";x.appendChild(D);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(E,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=F;K.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";K.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";F=document.createElement("a");F.className="geButton";if(!u){var L=F.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;J.push(c);m(g)},function(c){q(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=p(f,J,null,0);e();c.preventDefault();mxEvent.consume(c)});K.appendChild(L)}L=F.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";A();b.preventDefault();mxEvent.consume(b)});K.appendChild(L);b.commentsRefreshNeeded()&&(L=F.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){A();
-b.preventDefault();mxEvent.consume(b)}),K.appendChild(L));b.commentsSaveNeeded()&&(F=F.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',F.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),K.appendChild(F));x.appendChild(K);var J=[],A=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
-var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});D.innerHTML="";D.appendChild(E);E.style.display="block";J=b;for(b=0;b<J.length;b++)c(J[b].replies),p(J[b],J,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(D.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});A();this.refreshComments=A;K=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=D.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<J.length;e++)b(J[e])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function p(b){b.style.border="";b.removeChild(b.busyImg)}function q(c,e,g,k,n){function B(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});D.appendChild(f);e&&(f.style.display="none")}function x(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=R;b(c);return{pdiv:e,replies:d}}function N(e,f,g,n,t){function v(){l(N);c.addReply(C,function(b){C.id=b;c.replies.push(C);p(N);g&&g()},function(c){u();m(N);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function u(){d(C,N,function(b){v()},!0)}var B=x().pdiv,C=b.newComment(e,b.getCurrentUser());C.pCommentId=c.id;null==c.replies&&(c.replies=[]);var N=q(C,c.replies,B,k+1);f?u():v()}if(n||!c.isResolved){E.style.display="none";var R=document.createElement("div");R.className="geCommentContainer";R.setAttribute("data-commentId",c.id);R.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(R.style.backgroundColor="ghostWhite");
+var G=document.createElement("div");G.className="geCommentHeader";var V=document.createElement("img");V.className="geCommentUserImg";V.src=c.user.pictureUrl||Editor.userImage;G.appendChild(V);V=document.createElement("div");V.className="geCommentHeaderTxt";G.appendChild(V);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,c.user.displayName||"");V.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",c.id);f(c,
+K);V.appendChild(K);R.appendChild(G);G=document.createElement("div");G.className="geCommentTxt";mxUtils.write(G,c.content||"");R.appendChild(G);c.isLocked&&(R.style.opacity="0.5");G=document.createElement("div");G.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";G.appendChild(D);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){N("",!0)},c.isResolved);V=b.getCurrentUser();null==V||V.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
+function(){function e(){d(c,R,function(){l(R);c.editComment(c.content,function(){p(R)},function(c){m(R);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(R);c.deleteComment(function(b){if(!0===b){b=R.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=R.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(R);R.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}E.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(R);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=x(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?N(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});R.appendChild(G);null!=g?C.insertBefore(R,g.nextSibling):C.appendChild(R);for(g=0;null!=c.replies&&g<c.replies.length;g++)G=c.replies[g],G.isResolved=c.isResolved,q(G,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,R,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return R}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(D)+7+"px";x.appendChild(C);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(E,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=D;K.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";K.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className="geButton";if(!u){var L=D.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;J.push(c);p(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=q(f,J,null,0);e();c.preventDefault();mxEvent.consume(c)});K.appendChild(L)}L=D.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});K.appendChild(L);b.commentsRefreshNeeded()&&(L=D.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){B();
+b.preventDefault();mxEvent.consume(b)}),K.appendChild(L));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),K.appendChild(D));x.appendChild(K);var J=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(E);E.style.display="block";J=b;for(b=0;b<J.length;b++)c(J[b].replies),q(J[b],J,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;K=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<J.length;e++)b(J[e])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=
new mxWindow(mxResources.get("comments"),x,c,e,k,g,!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(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
-k,g,n,t,d,f,l,q){var m=document.createElement("div");m.style.textAlign="center";q=null!=q?q:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=q+"px";p.style.lineHeight="1.2em";mxUtils.write(p,c);m.appendChild(p);null!=l&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),p.appendChild(c),m.appendChild(p));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+k,g,n,t,d,f,l,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=m+"px";q.style.lineHeight="1.2em";mxUtils.write(q,c);p.appendChild(q);null!=l&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),q.appendChild(c),p.appendChild(q));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(u.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&l.appendChild(n);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(u.checked)});l.appendChild(v);null!=t?(v.innerHTML=
-t+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);m.appendChild(l);f?(l.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,
-"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.focus()};this.container=m};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):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")};
+t+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);p.appendChild(l);f?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.focus()};this.container=p};function DiagramPage(b,c){this.node=b;null!=c?this.node.setAttribute("id",c):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,c,e){this.ui=b;this.page=c;this.previous=this.name=e}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,c,e){this.ui=b;this.oldIndex=c;this.newIndex=e}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,c,e){this.ui=b;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=e&&(c.viewState=e,this.neverShown=!1))}
@@ -3802,7 +3807,7 @@ EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.
b)+1);k.updateCustomLinks(k.createCellMapping(n,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
EditorUi.prototype.movePage=function(b,c){this.editor.graph.model.execute(new MovePage(this,b,c))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display="inline-block";c.style.verticalAlign="top";c.style.height=this.tabContainer.style.height;c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.fontSize="13px";c.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
-1),g=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+1),g=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(n,this.createTabForPage(this.pages[n],k,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(c.clientWidth>this.tabContainer.clientWidth-e){null!=k&&(k.style.position="absolute",k.style.right="0px",c.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
@@ -3821,7 +3826,7 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!k){var t=new mxPopupMenu(th
EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=c&&(g+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+k.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var g=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,q){c=this.createUrlParameters(c,e,d,f,k,q);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,m){c=this.createUrlParameters(c,e,d,f,k,m);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),k))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.previous;k.previous=k.name;k.name=b;return k};mxCodecRegistry.register(b)})();
@@ -3833,38 +3838,38 @@ c,e,t,d,f),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.pro
!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function d(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=v.cloneCells([f[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(f[0],
!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=v.view.getState(b),n=v.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var q=v.getOutgoingTreeEdges(v.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=f=0;u<q.length;u++){var A=v.model.getTerminal(q[u],!1);if(k==d(A)){var x=v.view.getState(A);A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}t?l=0:f=0;for(u=0;u<q.length;u++)if(A=v.model.getTerminal(q[u],!1),k==d(A)&&(x=v.view.getState(A),A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});v.moveCells(D,(c?1:-1)*f,(c?1:-1)*l)}}}return v.addCells(g,e)}finally{v.model.endUpdate()}}function l(b){v.model.beginUpdate();try{var c=
+b.geometry.height+10:-g[1].geometry.height-10)*n;var q=v.getOutgoingTreeEdges(v.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=f=0;u<q.length;u++){var B=v.model.getTerminal(q[u],!1);if(k==d(B)){var x=v.view.getState(B);B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
+p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}t?l=0:f=0;for(u=0;u<q.length;u++)if(B=v.model.getTerminal(q[u],!1),k==d(B)&&(x=v.view.getState(B),B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var C=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&C.push(c);(null==c||d)&&C.push(b);return null==c||d});v.moveCells(C,(c?1:-1)*f,(c?1:-1)*l)}}}return v.addCells(g,e)}finally{v.model.endUpdate()}}function l(b){v.model.beginUpdate();try{var c=
d(b),e=v.getIncomingTreeEdges(b),f=v.cloneCells([e[0],b]);v.model.setTerminal(e[0],f[1],!1);v.model.setTerminal(f[0],f[1],!0);v.model.setTerminal(f[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);v.moveCells(l,m,n);return v.addCells(f,g)}finally{v.model.endUpdate()}}function q(b,c){v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[v.createEdge(e,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([f[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)v.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(Y){}}var f=v.getOutgoingTreeEdges(b),p=e.geometry,l=[];v.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var q=v.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,A=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/A-u.y+-p.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function m(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
-d.y-d.height})}return e}function p(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?u.actions.get("selectParent").funct():e==c?(f=v.getOutgoingTreeEdges(b),null!=f&&0<f.length&&v.setSelectionCell(v.model.getTerminal(f[0],!1))):(e=v.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=m(v.model.getTerminal(e[0],!0),f,b),e=v.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
+(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);v.moveCells(l,m,n);return v.addCells(f,g)}finally{v.model.endUpdate()}}function m(b,c){v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[v.createEdge(e,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([f[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),n;for(n in m)v.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(oa){}}var f=v.getOutgoingTreeEdges(b),p=e.geometry,l=[];v.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var q=v.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,B=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/B-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/B-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/B-u.y+-p.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function p(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+d.y-d.height})}return e}function q(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?u.actions.get("selectParent").funct():e==c?(f=v.getOutgoingTreeEdges(b),null!=f&&0<f.length&&v.setSelectionCell(v.model.getTerminal(f[0],!1))):(e=v.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=p(v.model.getTerminal(e[0],!0),f,b),e=v.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&v.setSelectionCell(f[e].cell)))))}var u=this,v=u.editor.graph,y=v.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var F=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return F.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var D=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=D.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+var D=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return D.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var E=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var A=v.view.getState(n);null!=A&&(d=(A.getCenterX()-u.getCenterX())/v.view.scale,e=(A.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var B=v.view.getState(n);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=E.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
!0))&&this.model.setTerminal(m[q],n,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){p=n;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var K=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=K.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
-!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):q(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
-v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(p(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(p(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(p(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(p(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(G){u.handleError(G)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var J=v.connectVertex;v.connectVertex=function(c,e,g,k,m,n,p){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),A=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?q(c,e):A==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return J.apply(this,arguments)};v.getSubtree=function(d){var e=
-[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):m(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(F){u.handleError(F)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var J=v.connectVertex;v.connectVertex=function(c,e,g,k,n,p,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return J.apply(this,arguments)};v.getSubtree=function(d){var e=
+[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(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(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){P.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){V.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.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 e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=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};');c.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 e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);var m=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};');
-m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);m.insertEdge(p,!1);var u=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};');
-u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(k);b.insert(p);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(m);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);g.insertEdge(k,!1);var p=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};');
+p.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;c.insertEdge(q,!0);p.insertEdge(q,!1);var u=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};');
+u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(k);b.insert(q);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(p);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=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;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'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;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'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};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3881,98 +3886,110 @@ e.className="geTitle";e.innerHTML='<span style="font-size:18px;margin-right:5px;
e.className="geTitle";var g=document.createElement("span");g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));e.appendChild(g);c.appendChild(e);mxEvent.addListener(e,"click",b.actions.get("newLibrary").funct);e=document.createElement("div");e.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;";e.className="geTitle";g=document.createElement("span");
g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("openLibrary"));e.appendChild(g);c.appendChild(e);mxEvent.addListener(e,"click",b.actions.get("openLibrary").funct)}else e=d("newLibrary",mxResources.get("newLibrary")),e.style.boxSizing="border-box",e.style.paddingRight="6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="0",e=d("openLibraryFrom",mxResources.get("openLibraryFrom")),e.style.borderLeft="1px solid lightgray",e.style.boxSizing="border-box",e.style.paddingRight=
"6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="50%";c.appendChild(b.sidebar.container);c.style.overflow="hidden";return c});b.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);b.sidebarWindow.window.setVisible(!0);b.getLocalData("sidebar",function(c){b.sidebar.showEntries(c,null,!0)});b.restoreLibraries()}else b.sidebarWindow.window.setVisible(null!=c?c:!b.sidebarWindow.window.isVisible());b.sidebarWindow.window.isVisible()&&b.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||
-"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,k=function(b,c,d,e,f,g,k){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";k(l);this.window=new mxWindow(c,l,d,e,
-f,g,!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(b,c){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-("1"==urlParams.sketch?3:48)));
-this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(c){null==c&&(c=window.event);return null!=c&&b.isSelectionAllowed(c)}))};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=
+"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=0;try{e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(C){}var k=function(b,c,d,e,f,g,k){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";k(l);this.window=
+new mxWindow(c,l,d,e,f,g,!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(b,c){var d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-("1"==urlParams.sketch?
+3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(c){null==c&&(c=window.event);return null!=c&&b.isSelectionAllowed(c)}))};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(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
-function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
-null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&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();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
-StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";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;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};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; }":
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);null==urlParams.dark&&(mxSettings.settings.darkMode=b,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.defaultPageBackgroundColor=
+"1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";c.loadStylesheet();null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&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();Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";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;n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};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 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 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; }html body .geStatus { padding-top:3px !important; }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: '+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
-(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
-(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#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()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+(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 n=document.createElement("style");n.type="text/css";n.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(n);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=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");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var f=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):f.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
-b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.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){var b=
-document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
-b.appendChild(c)}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,
-"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top=
-"6px"}};var m=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=m.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var p=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
-function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;p.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
-e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
-function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var v=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);v.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;
-EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"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 x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible="1"!=urlParams.sketch;
-d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){d.setSketchMode(!Editor.sketchMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=d.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(b){d.setPagesVisible(!Editor.pagesVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.pagesVisible});d.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){e.popupMenuHandler.hideMenu();d.showImportCsvDialog()}));d.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("formatSql",
-new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(d,"Insert from Text","formatSql");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){c(d)},null,null,Editor.ctrlKey+"+Shift+K"));d.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(d)})).shortcut=d.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!d.isOffline()&&
-d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(b.container,620,420,!0,!1);b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=
-this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();d.menus.addSubmenu("extras",b,c,mxResources.get("preferences"));b.addSeparator(c);
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&d.menus.addMenuItems(b,["-","save"],c),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&d.menus.addMenuItems(b,["saveAndExit"],c),b.addSeparator(c)):(d.menus.addMenuItems(b,["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),
-null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));d.menus.addSubmenu("exportAs",b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,
-["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,["print"],c);null!=e&&null!=d.fileNode&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?d.menus.addMenuItems(b,["-","exit"],c):d.menus.addMenuItems(b,
-["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==
-e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);b.addSeparator(c);d.menus.addSubmenu("embed",b,c)})));var l=this.get("language");this.put("table",
-new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,
-function(b,c){"1"!=urlParams.embed&&d.menus.addSubmenu("theme",b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],c);this.addMenuItems(b,["toggleDarkMode"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c);
-"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],c);b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),
-c=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,
-e,f);d.showDialog(b.container,620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.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%;";
-c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var F=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display=
-"inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+
-mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle=
-"none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",
-function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign=
-"top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);
-return d}function k(){for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));"1"==urlParams.sketch?ba.style.left=58>I.offsetTop-I.offsetHeight/2?"70px":"10px":(c=b?d("diagram",null,Editor.drawLogoImage):null,null!=c&&(k=c),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:null)],b?60:null),c=d("insert",!0,b?B:null),g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=e&&(g([ta,S],60),520<=e&&g([ra,
-640<=e?f("",ca.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ca,Editor.zoomInImage):null,640<=e?f("",R.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",R,Editor.zoomOutImage):null],60)));null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=
-c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==oa&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",
-c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),oa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=oa&&(oa.parentNode.removeChild(oa),oa=null))}F.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom=
-"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==
-urlParams.sketch||1E3<=e)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.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(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();
-n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=
-b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";var C=n.menus.get("viewZoom"),B="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,U="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,ba="1"==urlParams.sketch?document.createElement("div"):null,V=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
-(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",V);n.addListener("sketchModeChanged",V);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var qa=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||
-qa.apply(this,arguments)}}if(null!=p.freehand){var ma=p.freehand.createStyle;p.freehand.createStyle=function(b){return ma.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){I.className="geToolbarContainer";U.className="geToolbarContainer";ba.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=I;var ja=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ja||(n.statusContainer.style.display=
-"none")});var na=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=
-null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();na(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ja=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ja=!1)}else n.statusContainer.style.display=
-"inline-block",na(null),ja=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));O=d("diagram",null,Editor.menuImage);O.style.boxShadow="none";O.style.padding="6px";O.style.margin="0px";ba.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display=
-"none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";
-Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var ka=!1,la=mxUtils.bind(this,function(){I.innerHTML="";if(!ka){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
-null!=d?d:"default";b.style.margin="2px 0px";I.appendChild(b);mxUtils.br(I);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.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,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
-")",B);O=d("table",null,Editor.tableImage);O.style.boxShadow="none";O.style.opacity="0.7";O.style.padding="6px";O.style.margin="0px";O.style.width="37px";c(O,null,"pointer");b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}I.appendChild(Y)});mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){ka?(mxUtils.setPrefixedStyle(I.style,"transform","translate(0, -50%)"),I.style.padding="8px 6px 4px",I.style.top="50%",I.style.bottom="",I.style.height="",Y.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",Y.style.width="40px",Y.style.height="12px",Y.setAttribute("title","Minimize"),ka=!1,la()):(I.innerHTML="",I.appendChild(Y),mxUtils.setPrefixedStyle(I.style,"transform","translate(0, 0)"),I.style.top="",I.style.bottom="12px",I.style.padding="0px",I.style.height="24px",Y.style.height="24px",Y.style.backgroundImage="url("+Editor.plusImage+")",Y.setAttribute("title",mxResources.get("insert")),Y.style.width="24px",ka=!0)}));la();n.addListener("darkModeChanged",
-la);n.addListener("sketchModeChanged",la)}else n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=C){var V=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},ca=n.actions.get("zoomIn"),R=n.actions.get("zoomOut"),Z=n.actions.get("resetView"),W=n.actions.get("fullscreen");n.actions.get("toggleDarkMode");var da=n.actions.get("undo"),ia=n.actions.get("redo"),
-ta=f("",da.funct,null,mxResources.get("undo")+" ("+da.shortcut+")",da,Editor.undoImage),S=f("",ia.funct,null,mxResources.get("redo")+" ("+ia.shortcut+")",ia,Editor.redoImage);if(null!=U){var C=function(){aa.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length||Editor.pagesVisible?"inline-block":"none"},ea=n.actions.get("delete"),ha=f("",ea.funct,null,mxResources.get("delete"),ea,Editor.trashImage);ha.style.opacity="0.1";ba.appendChild(ha);ea.addListener("stateChanged",function(){ha.style.opacity=
-ea.enabled?"":"0.1"});Z=function(){ta.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";S.style.display=ta.style.display;ta.style.opacity=da.enabled?"":"0.1";S.style.opacity=ia.enabled?"":"0.1"};ba.appendChild(ta);ba.appendChild(S);da.addListener("stateChanged",Z);ia.addListener("stateChanged",Z);Z();null!=urlParams.layers&&(Z=n.actions.get("layers"),Z=f("",Z.funct,null,mxResources.get("layers"),Z,Editor.layersImage),Z.style.opacity="0.4",U.appendChild(Z));null!=
-urlParams.tags&&(Z=n.actions.get("tags"),Z=f("",Z.funct,null,mxResources.get("tags"),Z,Editor.tagsImage),Z.style.opacity="0.4",U.appendChild(Z));Z=n.actions.get("outline");Z=f("",Z.funct,null,mxResources.get("outline"),Z,Editor.outlineImage);U.appendChild(Z);Z=f("",R.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",R,Editor.zoomOutImage);U.appendChild(Z);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
-" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";U.appendChild(O);mxEvent.addListener(O,"click",V);V=f("",ca.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ca,Editor.zoomInImage);U.appendChild(V);var aa=this.createPageMenuTab(!1);
-aa.style.display="none";aa.style.position="";aa.style.marginLeft="";aa.style.top="";aa.style.left="";aa.style.height="100%";aa.style.lineHeight="";aa.style.borderStyle="none";aa.style.padding="3px 0";aa.style.margin="0px";aa.style.background="";aa.style.border="";aa.style.boxShadow="none";aa.style.verticalAlign="top";aa.firstChild.style.height="100%";aa.firstChild.style.opacity="0.6";aa.firstChild.style.margin="0px";U.appendChild(aa);n.addListener("fileDescriptorChanged",C);n.addListener("pagesVisibleChanged",
-C);C();n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;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;";ba.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;";
-U.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(ba);y.appendChild(U);I.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;";y.appendChild(I);window.setTimeout(function(){mxUtils.setPrefixedStyle(I.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else{f("",W.funct,null,mxResources.get("fullscreen"),W,Editor.fullscreenImage);var ra=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Z,Editor.zoomFitImage);q.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";O=u.addMenu("100%",C.funct);O.setAttribute("title",mxResources.get("zoom")+
-" (Alt+Mousewheel)");O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.textDecoration="none";O.style.overflow="hidden";O.style.visibility="hidden";O.style.textAlign="center";O.style.cursor="pointer";O.style.height=parseInt(n.tabContainerHeight)-1+"px";O.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";O.style.position="absolute";O.style.display="block";O.style.fontSize="12px";O.style.width="59px";O.style.right="0px";O.style.bottom="0px";O.style.backgroundImage=
-"url("+mxWindow.prototype.minimizeImage+")";O.style.backgroundPosition="right 6px center";O.style.backgroundRepeat="no-repeat";y.appendChild(O)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(O);var ua=n.setGraphEnabled;n.setGraphEnabled=function(){ua.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==U?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==U&&y.appendChild(n.tabContainer);var oa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();
-null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\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\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. Do you want to synchronize those changes?\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\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\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\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\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\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\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\npickGDriveFile=Pick 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\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="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><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="#000000"/><add as="fontColor" value="#000000"/></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="#ffffff"/><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="#ffffff"/><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="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><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="#ffffff"/></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;
+b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.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 b=document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else mxUtils.write(c,mxResources.get("save")),c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className=
+"geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var p=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=p.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
+e.x+=d.x-16;e.y+=d.y;return e};var q=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;q.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-",
+"lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||
+mxClient.IS_IE11)||this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
+var v=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);v.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"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 x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";
+d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible="1"!=urlParams.sketch;d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){d.setSketchMode(!Editor.sketchMode)}));
+f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=d.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(b){d.setPagesVisible(!Editor.pagesVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.pagesVisible});d.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){e.popupMenuHandler.hideMenu();d.showImportCsvDialog()}));d.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
+new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(d,"Insert from Text","formatSql");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){c(d)},null,null,Editor.ctrlKey+"+Shift+K"));d.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(d)})).shortcut=d.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(b.container,620,420,!0,!1);
+b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,
+c){var e=d.getCurrentFile();d.menus.addSubmenu("extras",b,c,mxResources.get("preferences"));b.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(b,["-","save"],c),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&d.menus.addMenuItems(b,["saveAndExit"],c),b.addSeparator(c)):(d.menus.addMenuItems(b,
+["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));d.menus.addSubmenu("exportAs",b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):
+d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,["print"],c);null!=e&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||
+this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&d.menus.addMenuItems(b,["-","exit"],c):d.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&
+"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,
+c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);b.addSeparator(c);d.menus.addSubmenu("embed",b,c)})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,
+function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&d.menus.addSubmenu("theme",b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"!=urlParams.embedInline&&("1"==urlParams.sketch&&
+this.addMenuItems(b,["toggleSketchMode"],c),this.addMenuItems(b,["toggleDarkMode"],c),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c),"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],c));b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",
+new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),c=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-",
+"toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=
+this.editor.graph,d=document.createElement("div");d.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%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var D=EditorUi.prototype.init;
+EditorUi.prototype.init=function(){function d(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,
+f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle="none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat=
+"no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled",
+"disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign="top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding=
+"10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(X.style.left=58>G.offsetTop-G.offsetHeight/2?"70px":"10px");else{for(var b=q.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);
+b=c}t=q.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));c=b?d("diagram",null,Editor.drawLogoImage):null;null!=c&&(k=c);g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+
+")",n.actions.get("image"),b?Editor.formatImage:null)],b?60:null);c=d("insert",!0,b?A:null);g([c,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null);411<=e&&(g([U,ea],60),520<=e&&g([xa,640<=e?f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",T,Editor.zoomInImage):null,640<=e?f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ra,Editor.zoomOutImage):null],60))}null!=
+k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));c=n.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==sa&&(c=u.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage=
+"url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(c),sa=c),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=sa&&(sa.parentNode.removeChild(sa),sa=null))}D.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 l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);
+"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==urlParams.sketch||1E3<=e)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);
+var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.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(b){mxEvent.getSource(b)==
+this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop=
+"7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");
+c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className=
+"geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,y=document.createElement("div");y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var I=n.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,S="1"==urlParams.sketch?
+document.createElement("div"):null,G="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null,ca=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",
+ca);n.addListener("sketchModeChanged",ca);var ma=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)X.style.left="10px",X.style.top="10px",G.style.left="10px",G.style.top="60px",S.style.top="10px",S.style.right="12px",S.style.left="",n.diagramContainer.setAttribute("data-bounds",n.diagramContainer.style.top+" "+n.diagramContainer.style.left+" "+n.diagramContainer.style.width+" "+n.diagramContainer.style.height),n.diagramContainer.style.top="0px",n.diagramContainer.style.left="0px",n.diagramContainer.style.bottom=
+"0px",n.diagramContainer.style.right="0px",n.diagramContainer.style.width="",n.diagramContainer.style.height="";else{var b=n.diagramContainer.getAttribute("data-bounds");if(null!=b){n.diagramContainer.style.background="transparent";n.diagramContainer.removeAttribute("data-bounds");var c=p.getGraphBounds(),b=b.split(" ");n.diagramContainer.style.top=b[0];n.diagramContainer.style.left=b[1];n.diagramContainer.style.width=c.width+50+"px";n.diagramContainer.style.height=c.height+46+"px";n.diagramContainer.style.bottom=
+"";n.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:n.diagramContainer.getBoundingClientRect()}),"*");n.refresh()}X.style.left=n.diagramContainer.offsetLeft+"px";X.style.top=n.diagramContainer.offsetTop-X.offsetHeight-4+"px";G.style.display="";G.style.left=n.diagramContainer.offsetLeft-G.offsetWidth-4+"px";G.style.top=n.diagramContainer.offsetTop+"px";S.style.left=n.diagramContainer.offsetLeft+n.diagramContainer.offsetWidth-S.offsetWidth+
+"px";S.style.top=X.style.top;S.style.right="";n.bottomResizer.style.left=n.diagramContainer.offsetLeft+(n.diagramContainer.offsetWidth-n.bottomResizer.offsetWidth)/2+"px";n.bottomResizer.style.top=n.diagramContainer.offsetTop+n.diagramContainer.offsetHeight-n.bottomResizer.offsetHeight/2-1+"px";n.rightResizer.style.left=n.diagramContainer.offsetLeft+n.diagramContainer.offsetWidth-n.rightResizer.offsetWidth/2-1+"px";n.rightResizer.style.top=n.diagramContainer.offsetTop+(n.diagramContainer.offsetHeight-
+n.bottomResizer.offsetHeight)/2+"px"}n.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";n.rightResizer.style.visibility=n.bottomResizer.style.visibility;q.style.display="none";X.style.visibility="";S.style.visibility=""}),ca=mxUtils.bind(this,function(){this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ma()});n.addListener("inlineFullscreenChanged",ca);n.addListener("editInlineStart",ca);"1"==urlParams.embedInline&&
+n.addListener("darkModeChanged",ca);n.addListener("editInlineStop",mxUtils.bind(this,function(b){n.diagramContainer.style.width="10px";n.diagramContainer.style.height="10px";n.diagramContainer.style.border="";n.bottomResizer.style.visibility="hidden";n.rightResizer.style.visibility="hidden";X.style.visibility="hidden";S.style.visibility="hidden";G.style.display="none"}));Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&
+!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var fa=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||fa.apply(this,arguments)}}if(null!=p.freehand){var na=p.freehand.createStyle;p.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){G.className="geToolbarContainer";S.className="geToolbarContainer";X.className="geToolbarContainer";
+q.className="geToolbarContainer";n.picker=G;var ka=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ka||(n.statusContainer.style.display="none")});var oa=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed?(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();oa(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?
+(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ka=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ka=!1)}else n.statusContainer.style.display="inline-block",oa(null),ka=!0;q.style.visibility=12<q.clientWidth?"":"hidden"}))):n.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.style.visibility=16<q.clientWidth?"":"hidden"}));O=d("diagram",
+null,Editor.menuImage);O.style.boxShadow="none";O.style.padding="6px";O.style.margin="0px";X.appendChild(O);mxEvent.disableContextMenu(O);mxEvent.addGestureListeners(O,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding=
+"6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var Z=document.createElement("a");Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var la=!1,aa=mxUtils.bind(this,function(){G.innerHTML="";if(!la){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";b.style.margin="2px 0px";G.appendChild(b);mxUtils.br(G);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.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,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);
+b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],
+b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+")",A);O=d("table",null,Editor.tableImage);O.style.boxShadow="none";O.style.opacity="0.7";O.style.padding="6px";O.style.margin=
+"0px";O.style.width="37px";c(O,null,"pointer");b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}"1"!=urlParams.embedInline&&G.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){la?(mxUtils.setPrefixedStyle(G.style,"transform","translate(0, -50%)"),G.style.padding="8px 6px 4px",G.style.top="50%",G.style.bottom="",G.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",
+Z.setAttribute("title","Minimize"),la=!1,aa()):(G.innerHTML="",G.appendChild(Z),mxUtils.setPrefixedStyle(G.style,"transform","translate(0, 0)"),G.style.top="",G.style.bottom="12px",G.style.padding="0px",G.style.height="24px",Z.style.height="24px",Z.style.backgroundImage="url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",la=!0)}));aa();n.addListener("darkModeChanged",aa);n.addListener("sketchModeChanged",aa)}else n.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=I){var ca=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},T=n.actions.get("zoomIn"),ra=n.actions.get("zoomOut"),Q=n.actions.get("resetView"),da=n.actions.get("fullscreen");n.actions.get("toggleDarkMode");var ia=n.actions.get("undo"),wa=n.actions.get("redo"),U=f("",ia.funct,null,mxResources.get("undo")+" ("+ia.shortcut+")",ia,Editor.undoImage),
+ea=f("",wa.funct,null,mxResources.get("redo")+" ("+wa.shortcut+")",wa,Editor.redoImage),da=f("",da.funct,null,mxResources.get("fullscreen"),da,Editor.fullscreenImage);if(null!=S){I=function(){Y.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length||Editor.pagesVisible?"inline-block":"none"};da.parentNode.removeChild(da);var ha=n.actions.get("delete"),ja=f("",ha.funct,null,mxResources.get("delete"),ha,Editor.trashImage);ja.style.opacity="0.1";X.appendChild(ja);ha.addListener("stateChanged",
+function(){ja.style.opacity=ha.enabled?"":"0.1"});Q=function(){U.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";ea.style.display=U.style.display;U.style.opacity=ia.enabled?"":"0.1";ea.style.opacity=wa.enabled?"":"0.1"};X.appendChild(U);X.appendChild(ea);ia.addListener("stateChanged",Q);wa.addListener("stateChanged",Q);Q();null!=urlParams.layers&&(Q=n.actions.get("layers"),Q=f("",Q.funct,null,mxResources.get("layers"),Q,Editor.layersImage),Q.style.opacity=
+"0.4",S.appendChild(Q));null!=urlParams.tags&&(Q=n.actions.get("tags"),Q=f("",Q.funct,null,mxResources.get("tags"),Q,Editor.tagsImage),Q.style.opacity="0.4",S.appendChild(Q));Q=n.actions.get("outline");Q=f("",Q.funct,null,mxResources.get("outline"),Q,Editor.outlineImage);S.appendChild(Q);Q=f("",ra.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ra,Editor.zoomOutImage);S.appendChild(Q);var O=document.createElement("div");O.innerHTML="100%";O.setAttribute("title",mxResources.get("fitWindow")+
+"/"+mxResources.get("resetView")+" (Enter)");O.style.display="inline-block";O.style.cursor="pointer";O.style.textAlign="center";O.style.whiteSpace="nowrap";O.style.paddingRight="10px";O.style.textDecoration="none";O.style.verticalAlign="top";O.style.padding="6px 0";O.style.fontSize="14px";O.style.width="40px";O.style.opacity="0.4";S.appendChild(O);mxEvent.addListener(O,"click",ca);ca=f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",T,Editor.zoomInImage);S.appendChild(ca);
+"1"==urlParams.embedInline&&S.appendChild(da);var Y=this.createPageMenuTab(!1);Y.style.display="none";Y.style.position="";Y.style.marginLeft="";Y.style.top="";Y.style.left="";Y.style.height="100%";Y.style.lineHeight="";Y.style.borderStyle="none";Y.style.padding="3px 0";Y.style.margin="0px";Y.style.background="";Y.style.border="";Y.style.boxShadow="none";Y.style.verticalAlign="top";Y.firstChild.style.height="100%";Y.firstChild.style.opacity="0.6";Y.firstChild.style.margin="0px";S.appendChild(Y);n.addListener("fileDescriptorChanged",
+I);n.addListener("pagesVisibleChanged",I);I();n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;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;";X.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;";
+S.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";y.appendChild(X);y.appendChild(S);G.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;";y.appendChild(G);window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(y)}else{var xa=f("",ca,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);q.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";O=u.addMenu("100%",I.funct);O.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");O.style.whiteSpace="nowrap";O.style.paddingRight=
+"10px";O.style.textDecoration="none";O.style.textDecoration="none";O.style.overflow="hidden";O.style.visibility="hidden";O.style.textAlign="center";O.style.cursor="pointer";O.style.height=parseInt(n.tabContainerHeight)-1+"px";O.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";O.style.position="absolute";O.style.display="block";O.style.fontSize="12px";O.style.width="59px";O.style.right="0px";O.style.bottom="0px";O.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";O.style.backgroundPosition=
+"right 6px center";O.style.backgroundRepeat="no-repeat";y.appendChild(O)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(O);var ua=n.setGraphEnabled;n.setGraphEnabled=function(){ua.apply(this,arguments);null!=this.tabContainer&&(O.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom=
+"hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==S&&y.appendChild(n.tabContainer);var sa=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();
+null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";G.style.transform="";mxEvent.addGestureListeners(n.diagramContainer.parentNode,function(b){mxEvent.getSource(b)==n.diagramContainer.parentNode&&n.sendEmbeddedSvgExport()});l=document.createElement("div");l.style.position="absolute";l.style.width=
+"10px";l.style.height="10px";l.style.borderRadius="5px";l.style.border="1px solid gray";l.style.background="#ffffff";l.style.cursor="row-resize";n.diagramContainer.parentNode.appendChild(l);n.bottomResizer=l;var va=null,pa=null,Ba=null,Ca=null;mxEvent.addGestureListeners(l,function(b){Ca=parseInt(n.diagramContainer.style.height);pa=mxEvent.getClientY(b);p.popupMenuHandler.hideMenu();mxEvent.consume(b)});l=l.cloneNode(!1);l.style.cursor="col-resize";n.diagramContainer.parentNode.appendChild(l);n.rightResizer=
+l;mxEvent.addGestureListeners(l,function(b){Ba=parseInt(n.diagramContainer.style.width);va=mxEvent.getClientX(b);p.popupMenuHandler.hideMenu();mxEvent.consume(b)});mxEvent.addGestureListeners(document.body,null,function(b){var c=!1;null!=va&&(n.diagramContainer.style.width=Math.max(20,Ba+mxEvent.getClientX(b)-va)+"px",c=!0);null!=pa&&(n.diagramContainer.style.height=Math.max(20,Ca+mxEvent.getClientY(b)-pa)+"px",c=!0);c&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,
+rect:n.diagramContainer.getBoundingClientRect()}),"*"),n.fireEvent(new mxEventObject("editInlineStart")),n.refresh())},function(b){null==va&&null==pa||mxEvent.consume(b);pa=va=null});p.defaultPageBackgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";n.bottomResizer.style.visibility="hidden";n.rightResizer.style.visibility="hidden";X.style.visibility="hidden";S.style.visibility="hidden";G.style.display="none"}"1"==urlParams.prefetchFonts&&
+n.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\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\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. Do you want to synchronize those changes?\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\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\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\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\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\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\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\npickGDriveFile=Pick 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\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="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><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="#000000"/><add as="fontColor" value="#000000"/></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="#ffffff"/><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="#ffffff"/><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="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><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="#ffffff"/></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=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="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><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="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></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="#2a2a2a"/><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="#2a2a2a"/><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="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><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="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(b,c,e){this.init(b,c,e)};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;
GraphViewer.prototype.init=function(b,c,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
@@ -3982,9 +3999,9 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+
" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};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 k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var m=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
-this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=m&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),m=this.xmlNode)}),n=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
-b.originalSrc=c))}n.apply(this,arguments)};var u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};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),
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var n=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=n&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),n=this.xmlNode)}),q=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
+b.originalSrc=c))}q.apply(this,arguments)};var u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};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(b){return!mxEvent.isPopupTrigger(b.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(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var v=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return v.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
@@ -4005,27 +4022,27 @@ this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWi
k);var t=mxUtils.bind(this,function(d){var e=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var k=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||c.width+2*this.graph.border>b.offsetWidth||c.height+2*this.graph.border>k)?(d=null,null!=k&&c.height+2*this.graph.border>k-2&&(d=(k-2*this.graph.border-2)/c.height),this.fitGraph(d)):this.widthIsEmpty||
null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),g=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();g=null;t(b)}};
GraphViewer.prototype.crop=function(){var b=this.graph,c=b.getGraphBounds(),e=b.border,k=b.view.scale;b.view.setTranslate(null!=c.x?Math.floor(b.view.translate.x-c.x/k+e):e,null!=c.y?Math.floor(b.view.translate.y-c.y/k+e):e)};GraphViewer.prototype.updateContainerWidth=function(b,c){b.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(b,c){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,n=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var q=n.getCell(k[l]);null!=q&&(t=!0,f[q.id]=!0)}else for(l=0;l<e.length;l++)q=n.getChildAt(n.root,parseInt(e[l])),null!=q&&(t=!0,f[q.id]=!0);for(l=
-0;t&&l<d;l++)q=n.getChildAt(n.root,l),n.setVisible(q,f[q.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,n=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var m=n.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=n.getChildAt(n.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
+0;t&&l<d;l++)m=n.getChildAt(n.root,l),n.setVisible(m,f[m.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
GraphViewer.prototype.addToolbar=function(){function b(b,c,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",b);null!=d&&g.setAttribute("title",d);g.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",c);b.style.width="18px";null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);q++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);m++;return g}var c=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?c.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(c.style.marginTop=this.toolbarHeight+"px");var e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,n=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,q=0,m=null,p=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
-v.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(v,70);var F=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(v);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");D.style.paddingLeft="0px";D.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";F.style.display=v.style.display;D.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)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"==x){if(this.layersEnabled){var E=this.graph.getModel(),K=b(mxUtils.bind(this,function(b){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
-(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});b=K.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily=Editor.defaultHtmlFont;m.style.fontSize=
-"11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var c=mxUtils.getDocumentScrollOrigin(document);m.style.left=c.x+b.left-1+"px";m.style.top=c.y+b.bottom-2+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
-function(b){null==p&&(p=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),p.div.getElementsByTagName("div")[0].style.position="",p.div.style.maxHeight="160px",p.div.style.maxWidth="120px",p.div.style.padding="2px",p.div.style.overflow="auto",p.div.style.height="auto",p.div.style.position="fixed",p.div.style.fontFamily=Editor.defaultHtmlFont,p.div.style.fontSize="11px",p.div.style.backgroundColor="#eee",p.div.style.color="#000",p.div.style.border="1px solid #d0d0d0",p.div.style.zIndex=
-this.toolbarZIndex+1,mxUtils.setOpacity(p.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=p.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);p.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
+this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,m=0,p=null,q=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
+v.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(v,70);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)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"==x){if(this.layersEnabled){var E=this.graph.getModel(),K=b(mxUtils.bind(this,function(b){if(null!=p)p.parentNode.removeChild(p),
+p=null;else{p=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});b=K.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily=Editor.defaultHtmlFont;p.style.fontSize=
+"11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var c=mxUtils.getDocumentScrollOrigin(document);p.style.left=c.x+b.left-1+"px";p.style.top=c.y+b.bottom-2+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");E.addListener(mxEvent.CHANGE,function(){K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"});K.style.display=1<E.getChildCount(E.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+function(b){null==q&&(q=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),q.div.getElementsByTagName("div")[0].style.position="",q.div.style.maxHeight="160px",q.div.style.maxWidth="120px",q.div.style.padding="2px",q.div.style.overflow="auto",q.div.style.height="auto",q.div.style.position="fixed",q.div.style.fontFamily=Editor.defaultHtmlFont,q.div.style.fontSize="11px",q.div.style.backgroundColor="#eee",q.div.style.color="#000",q.div.style.border="1px solid #d0d0d0",q.div.style.zIndex=
+this.toolbarZIndex+1,mxUtils.setOpacity(q.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=q.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);q.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");E.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&
-(this.graph.minimumContainerSize.width=34*q);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*q;var H=c.style.border,J=mxUtils.bind(this,function(){e.style.width=
+(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,J=mxUtils.bind(this,function(){e.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?
-e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=m&&(m.parentNode.removeChild(m),m=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==m)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",J):J();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&J()})).observe(c)};
+e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=p&&(p.parentNode.removeChild(p),p=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
+c||b==e||b==p)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",J):J();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&J()})).observe(c)};
GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
@@ -4047,7 +4064,7 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function n(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.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>';
-c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,J=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},A=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};A(e,"scroll",J);A(k,"scroll",J)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,q=e.length;f<q;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,J=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},B=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",J);B(k,"scroll",J)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 26ba5c1c..b150cc58 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"15.5.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/"),
+var mxClient={VERSION:"15.5.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),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]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
diff --git a/src/main/webapp/plugins/explore.js b/src/main/webapp/plugins/explore.js
index ea09c0e7..b6f0bd02 100644
--- a/src/main/webapp/plugins/explore.js
+++ b/src/main/webapp/plugins/explore.js
@@ -32,8 +32,8 @@ Draw.loadPlugin(function(ui)
var container = document.createElement('div');
container.style.position = 'absolute';
container.style.display = 'block';
- container.style.background = (uiTheme == 'dark') ?
- '#2a2a2a' : '#ffffff';
+ container.style.background = (Editor.isDarkMode()) ?
+ Editor.darkColor : '#ffffff';
container.style.width = '100%';
container.style.height = '100%';
container.style.left = '0px';
diff --git a/src/main/webapp/plugins/props.js b/src/main/webapp/plugins/props.js
index ca7f11ed..7e16351d 100644
--- a/src/main/webapp/plugins/props.js
+++ b/src/main/webapp/plugins/props.js
@@ -4,7 +4,7 @@
Draw.loadPlugin(function(ui) {
var div = document.createElement('div');
- div.style.background = Editor.isDarkMode() ? '#2a2a2a' : '#ffffff';
+ div.style.background = Editor.isDarkMode() ? Editor.darkColor : '#ffffff';
div.style.border = '1px solid gray';
div.style.opacity = '0.8';
div.style.padding = '10px';
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 096d0345..8be33603 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"2017d325ef5cd250c87fa288a9e7c0cc"},{url:"js/extensions.min.js",revision:"8f6625690fa713232aedd263ba09d115"},{url:"js/stencils.min.js",revision:"8ada746d21157d3d47e6ad3abbbcc3ab"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"00339c600732790e04874fb33825899c"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"434a97c3538795cafe8ebcadadd2424b"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6e9412c359a21b86dc7c5128bf6208d4"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ff6d6e41b861a30d0b39ac80bd34afa7"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c0c8dc057fd346abf2993d2c7b09adf5"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"887d3ac605a7bb297067537e7c1f5686"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"5bf047c67091006edf94a8a7d779374d"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"8b670f4b6ccde55358851da705ae884f"},{url:"connect/confluence/includeDiagram.html",revision:"c03c89622d22227313645900af4e3c3d"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_am.txt",revision:"e55067ae4d55857d3070f396ede3763a"},{url:"resources/dia_ar.txt",revision:"dc10e48a9af84289ca4f184d44ad5bca"},{url:"resources/dia_bg.txt",revision:"0b3a976cb66eedd6d5499f4c86f43597"},{url:"resources/dia_bn.txt",revision:"66f3d38b47e70fde02749a6e14916b0b"},{url:"resources/dia_bs.txt",revision:"f540f69f3cc75675b5045d34bae33991"},{url:"resources/dia_ca.txt",revision:"d78617c2e9e999eb75ff70c155dfc15a"},{url:"resources/dia_cs.txt",revision:"9d09828fe5b99804a8b145dcf6bcfaad"},{url:"resources/dia_da.txt",revision:"d0cf005e4b117c4bb8736b34257fa53f"},{url:"resources/dia_de.txt",revision:"c9db127ff9921fd13bfaf3a1c4481a19"},{url:"resources/dia_el.txt",revision:"bde5f6b632a7fb3a5cdc8bcc3c8a21de"},{url:"resources/dia_eo.txt",revision:"4e4ea2bb8617e6844cb6c381edc07136"},{url:"resources/dia_es.txt",revision:"7b377b96724bb48fd88087ee78fab6dd"},{url:"resources/dia_et.txt",revision:"f761f425860c66c0b95e9dee38af544b"},{url:"resources/dia_eu.txt",revision:"877f76f596cefd9a2579be44ff123e46"},{url:"resources/dia_fa.txt",revision:"f527c1d3f3053544ce9ce7e8a4bdb25f"},{url:"resources/dia_fi.txt",revision:"f12cff9b660dc51b44e7844c1fb9ff8f"},{url:"resources/dia_fil.txt",revision:"2356557138b9aa9c58b17c3f2c3713ba"},{url:"resources/dia_fr.txt",revision:"3de1d090961ce832eef5ca054b18a9bf"},{url:"resources/dia_gl.txt",revision:"6f89c6614d0e52e34d13c2bbb570a71d"},{url:"resources/dia_gu.txt",revision:"f325d0bc7ce01bfe2d1a5342848a6463"},{url:"resources/dia_he.txt",revision:"55a669d7455bb036de5814ea1ac56737"},{url:"resources/dia_hi.txt",revision:"437d7b2e7b6dea531305d6694242f3a4"},{url:"resources/dia_hr.txt",revision:"b7ce2dfccd64f4ef1bbf08146d6c7e54"},{url:"resources/dia_hu.txt",revision:"5358c536ef8667aca0526dc6e1ae2903"},{url:"resources/dia_id.txt",revision:"1ec7bae1342609fa287b4d8999f7fa8d"},{url:"resources/dia_it.txt",revision:"a42712f2ba3ef5159223992e1d84a3e4"},{url:"resources/dia_ja.txt",revision:"141b274dd11e7780d4045c1fa1cad8fa"},{url:"resources/dia_kn.txt",revision:"21633a3d2a7126cd54176cb217c626ea"},{url:"resources/dia_ko.txt",revision:"1045fd33a5abb795e9bd69e47d5030ca"},{url:"resources/dia_lt.txt",revision:"bac0df086b9f5b81014325c8b90b17aa"},{url:"resources/dia_lv.txt",revision:"979679783b20b8320dcb27f226713e64"},{url:"resources/dia_ml.txt",revision:"58db4d45d0229ed787828efd2b421f73"},{url:"resources/dia_mr.txt",revision:"230aaef82f89671e5e2a38dda30e3dd6"},{url:"resources/dia_ms.txt",revision:"c48e8fe6d32bedf9983da01aabeb6adf"},{url:"resources/dia_my.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_nl.txt",revision:"139a8d6c5a09df090746dd3c7feac125"},{url:"resources/dia_no.txt",revision:"a7c2f933cfcd3d920a577c94c5d78630"},{url:"resources/dia_pl.txt",revision:"b82d913f6fcbb933c012448230a13de1"},{url:"resources/dia_pt-br.txt",revision:"3b3a1365481ac7bc75b25497a34dfdc0"},{url:"resources/dia_pt.txt",revision:"29fd615b2c5e638911ffee5c6157074b"},{url:"resources/dia_ro.txt",revision:"280076b30ec48f27f529c747040e9042"},{url:"resources/dia_ru.txt",revision:"2353e9ce6cbf496a25494df7275863f0"},{url:"resources/dia_si.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_sk.txt",revision:"251cdfff7b7e0643f310c2675cd6a590"},{url:"resources/dia_sl.txt",revision:"2f37c20dc4ab20a4534b809ece82a42d"},{url:"resources/dia_sr.txt",revision:"0bff657d99483eb38765b1055d42adb1"},{url:"resources/dia_sv.txt",revision:"fe04bc85ed125ca00aca4ab9b08b8bd4"},{url:"resources/dia_sw.txt",revision:"749592107e620923cb2307b2b80fcbb1"},{url:"resources/dia_ta.txt",revision:"44175b7066417421d6db7fed1bbc5fe0"},{url:"resources/dia_te.txt",revision:"e4bf4fb58853a29110a9579eddfe5881"},{url:"resources/dia_th.txt",revision:"687cfcd42587633e303b2e1f5eb1d2c4"},{url:"resources/dia_tr.txt",revision:"415f3ff69ed302728f47625c749fdf67"},{url:"resources/dia_uk.txt",revision:"9ff1fd58a63812a716a8f677002e9f59"},{url:"resources/dia_vi.txt",revision:"04e395181dbfa61f20805b25514765fd"},{url:"resources/dia_zh-tw.txt",revision:"29e9bd7cec3f06c6df629406a2327005"},{url:"resources/dia_zh.txt",revision:"7cb113801ebccb23ae4736b9cb27e289"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"0ba22f80f76cbebfe57e11675b8ae969"},{url:"js/extensions.min.js",revision:"8f6625690fa713232aedd263ba09d115"},{url:"js/stencils.min.js",revision:"8ada746d21157d3d47e6ad3abbbcc3ab"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"00339c600732790e04874fb33825899c"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"0bd71849f7e059aad36830d25ea45cda"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6e9412c359a21b86dc7c5128bf6208d4"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ff6d6e41b861a30d0b39ac80bd34afa7"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c0c8dc057fd346abf2993d2c7b09adf5"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"887d3ac605a7bb297067537e7c1f5686"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"5bf047c67091006edf94a8a7d779374d"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"8b670f4b6ccde55358851da705ae884f"},{url:"connect/confluence/includeDiagram.html",revision:"c03c89622d22227313645900af4e3c3d"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_am.txt",revision:"e55067ae4d55857d3070f396ede3763a"},{url:"resources/dia_ar.txt",revision:"dc10e48a9af84289ca4f184d44ad5bca"},{url:"resources/dia_bg.txt",revision:"0b3a976cb66eedd6d5499f4c86f43597"},{url:"resources/dia_bn.txt",revision:"66f3d38b47e70fde02749a6e14916b0b"},{url:"resources/dia_bs.txt",revision:"f540f69f3cc75675b5045d34bae33991"},{url:"resources/dia_ca.txt",revision:"d78617c2e9e999eb75ff70c155dfc15a"},{url:"resources/dia_cs.txt",revision:"9d09828fe5b99804a8b145dcf6bcfaad"},{url:"resources/dia_da.txt",revision:"d0cf005e4b117c4bb8736b34257fa53f"},{url:"resources/dia_de.txt",revision:"c9db127ff9921fd13bfaf3a1c4481a19"},{url:"resources/dia_el.txt",revision:"bde5f6b632a7fb3a5cdc8bcc3c8a21de"},{url:"resources/dia_eo.txt",revision:"4e4ea2bb8617e6844cb6c381edc07136"},{url:"resources/dia_es.txt",revision:"7b377b96724bb48fd88087ee78fab6dd"},{url:"resources/dia_et.txt",revision:"f761f425860c66c0b95e9dee38af544b"},{url:"resources/dia_eu.txt",revision:"877f76f596cefd9a2579be44ff123e46"},{url:"resources/dia_fa.txt",revision:"f527c1d3f3053544ce9ce7e8a4bdb25f"},{url:"resources/dia_fi.txt",revision:"f12cff9b660dc51b44e7844c1fb9ff8f"},{url:"resources/dia_fil.txt",revision:"2356557138b9aa9c58b17c3f2c3713ba"},{url:"resources/dia_fr.txt",revision:"3de1d090961ce832eef5ca054b18a9bf"},{url:"resources/dia_gl.txt",revision:"6f89c6614d0e52e34d13c2bbb570a71d"},{url:"resources/dia_gu.txt",revision:"f325d0bc7ce01bfe2d1a5342848a6463"},{url:"resources/dia_he.txt",revision:"55a669d7455bb036de5814ea1ac56737"},{url:"resources/dia_hi.txt",revision:"437d7b2e7b6dea531305d6694242f3a4"},{url:"resources/dia_hr.txt",revision:"b7ce2dfccd64f4ef1bbf08146d6c7e54"},{url:"resources/dia_hu.txt",revision:"5358c536ef8667aca0526dc6e1ae2903"},{url:"resources/dia_id.txt",revision:"1ec7bae1342609fa287b4d8999f7fa8d"},{url:"resources/dia_it.txt",revision:"a42712f2ba3ef5159223992e1d84a3e4"},{url:"resources/dia_ja.txt",revision:"141b274dd11e7780d4045c1fa1cad8fa"},{url:"resources/dia_kn.txt",revision:"21633a3d2a7126cd54176cb217c626ea"},{url:"resources/dia_ko.txt",revision:"1045fd33a5abb795e9bd69e47d5030ca"},{url:"resources/dia_lt.txt",revision:"bac0df086b9f5b81014325c8b90b17aa"},{url:"resources/dia_lv.txt",revision:"979679783b20b8320dcb27f226713e64"},{url:"resources/dia_ml.txt",revision:"58db4d45d0229ed787828efd2b421f73"},{url:"resources/dia_mr.txt",revision:"230aaef82f89671e5e2a38dda30e3dd6"},{url:"resources/dia_ms.txt",revision:"c48e8fe6d32bedf9983da01aabeb6adf"},{url:"resources/dia_my.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_nl.txt",revision:"139a8d6c5a09df090746dd3c7feac125"},{url:"resources/dia_no.txt",revision:"a7c2f933cfcd3d920a577c94c5d78630"},{url:"resources/dia_pl.txt",revision:"b82d913f6fcbb933c012448230a13de1"},{url:"resources/dia_pt-br.txt",revision:"3b3a1365481ac7bc75b25497a34dfdc0"},{url:"resources/dia_pt.txt",revision:"29fd615b2c5e638911ffee5c6157074b"},{url:"resources/dia_ro.txt",revision:"280076b30ec48f27f529c747040e9042"},{url:"resources/dia_ru.txt",revision:"2353e9ce6cbf496a25494df7275863f0"},{url:"resources/dia_si.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_sk.txt",revision:"251cdfff7b7e0643f310c2675cd6a590"},{url:"resources/dia_sl.txt",revision:"2f37c20dc4ab20a4534b809ece82a42d"},{url:"resources/dia_sr.txt",revision:"0bff657d99483eb38765b1055d42adb1"},{url:"resources/dia_sv.txt",revision:"fe04bc85ed125ca00aca4ab9b08b8bd4"},{url:"resources/dia_sw.txt",revision:"749592107e620923cb2307b2b80fcbb1"},{url:"resources/dia_ta.txt",revision:"44175b7066417421d6db7fed1bbc5fe0"},{url:"resources/dia_te.txt",revision:"e4bf4fb58853a29110a9579eddfe5881"},{url:"resources/dia_th.txt",revision:"687cfcd42587633e303b2e1f5eb1d2c4"},{url:"resources/dia_tr.txt",revision:"415f3ff69ed302728f47625c749fdf67"},{url:"resources/dia_uk.txt",revision:"9ff1fd58a63812a716a8f677002e9f59"},{url:"resources/dia_vi.txt",revision:"04e395181dbfa61f20805b25514765fd"},{url:"resources/dia_zh-tw.txt",revision:"29e9bd7cec3f06c6df629406a2327005"},{url:"resources/dia_zh.txt",revision:"7cb113801ebccb23ae4736b9cb27e289"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index 53d33efc..a969773c 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/5341f4cc19012587598a50bd5c5f8b30/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"2017d325ef5cd250c87fa288a9e7c0cc\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"8f6625690fa713232aedd263ba09d115\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"8ada746d21157d3d47e6ad3abbbcc3ab\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"28ab148081b0ccd22ad2db634d538b6b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"00339c600732790e04874fb33825899c\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"434a97c3538795cafe8ebcadadd2424b\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6e9412c359a21b86dc7c5128bf6208d4\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ff6d6e41b861a30d0b39ac80bd34afa7\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c0c8dc057fd346abf2993d2c7b09adf5\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"887d3ac605a7bb297067537e7c1f5686\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"5bf047c67091006edf94a8a7d779374d\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"8b670f4b6ccde55358851da705ae884f\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"c03c89622d22227313645900af4e3c3d\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"e55067ae4d55857d3070f396ede3763a\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"dc10e48a9af84289ca4f184d44ad5bca\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"0b3a976cb66eedd6d5499f4c86f43597\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"66f3d38b47e70fde02749a6e14916b0b\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"f540f69f3cc75675b5045d34bae33991\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d78617c2e9e999eb75ff70c155dfc15a\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"9d09828fe5b99804a8b145dcf6bcfaad\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"d0cf005e4b117c4bb8736b34257fa53f\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"c9db127ff9921fd13bfaf3a1c4481a19\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"bde5f6b632a7fb3a5cdc8bcc3c8a21de\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4e4ea2bb8617e6844cb6c381edc07136\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"7b377b96724bb48fd88087ee78fab6dd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"f761f425860c66c0b95e9dee38af544b\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"877f76f596cefd9a2579be44ff123e46\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"f527c1d3f3053544ce9ce7e8a4bdb25f\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"f12cff9b660dc51b44e7844c1fb9ff8f\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"2356557138b9aa9c58b17c3f2c3713ba\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"3de1d090961ce832eef5ca054b18a9bf\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6f89c6614d0e52e34d13c2bbb570a71d\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"f325d0bc7ce01bfe2d1a5342848a6463\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"55a669d7455bb036de5814ea1ac56737\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"437d7b2e7b6dea531305d6694242f3a4\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"b7ce2dfccd64f4ef1bbf08146d6c7e54\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"5358c536ef8667aca0526dc6e1ae2903\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"1ec7bae1342609fa287b4d8999f7fa8d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"a42712f2ba3ef5159223992e1d84a3e4\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"141b274dd11e7780d4045c1fa1cad8fa\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"21633a3d2a7126cd54176cb217c626ea\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"1045fd33a5abb795e9bd69e47d5030ca\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bac0df086b9f5b81014325c8b90b17aa\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"979679783b20b8320dcb27f226713e64\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"58db4d45d0229ed787828efd2b421f73\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"230aaef82f89671e5e2a38dda30e3dd6\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"c48e8fe6d32bedf9983da01aabeb6adf\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"139a8d6c5a09df090746dd3c7feac125\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a7c2f933cfcd3d920a577c94c5d78630\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b82d913f6fcbb933c012448230a13de1\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"3b3a1365481ac7bc75b25497a34dfdc0\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"29fd615b2c5e638911ffee5c6157074b\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"280076b30ec48f27f529c747040e9042\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"2353e9ce6cbf496a25494df7275863f0\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"251cdfff7b7e0643f310c2675cd6a590\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"2f37c20dc4ab20a4534b809ece82a42d\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"0bff657d99483eb38765b1055d42adb1\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"fe04bc85ed125ca00aca4ab9b08b8bd4\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"749592107e620923cb2307b2b80fcbb1\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"44175b7066417421d6db7fed1bbc5fe0\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"e4bf4fb58853a29110a9579eddfe5881\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"687cfcd42587633e303b2e1f5eb1d2c4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"415f3ff69ed302728f47625c749fdf67\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9ff1fd58a63812a716a8f677002e9f59\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"04e395181dbfa61f20805b25514765fd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"29e9bd7cec3f06c6df629406a2327005\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"7cb113801ebccb23ae4736b9cb27e289\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/6bdf54129646179b974b63d98b5ee447/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0ba22f80f76cbebfe57e11675b8ae969\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"8f6625690fa713232aedd263ba09d115\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"8ada746d21157d3d47e6ad3abbbcc3ab\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"28ab148081b0ccd22ad2db634d538b6b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"00339c600732790e04874fb33825899c\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"0bd71849f7e059aad36830d25ea45cda\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6e9412c359a21b86dc7c5128bf6208d4\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ff6d6e41b861a30d0b39ac80bd34afa7\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c0c8dc057fd346abf2993d2c7b09adf5\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"887d3ac605a7bb297067537e7c1f5686\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"5bf047c67091006edf94a8a7d779374d\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"8b670f4b6ccde55358851da705ae884f\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"c03c89622d22227313645900af4e3c3d\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"e55067ae4d55857d3070f396ede3763a\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"dc10e48a9af84289ca4f184d44ad5bca\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"0b3a976cb66eedd6d5499f4c86f43597\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"66f3d38b47e70fde02749a6e14916b0b\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"f540f69f3cc75675b5045d34bae33991\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d78617c2e9e999eb75ff70c155dfc15a\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"9d09828fe5b99804a8b145dcf6bcfaad\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"d0cf005e4b117c4bb8736b34257fa53f\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"c9db127ff9921fd13bfaf3a1c4481a19\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"bde5f6b632a7fb3a5cdc8bcc3c8a21de\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4e4ea2bb8617e6844cb6c381edc07136\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"7b377b96724bb48fd88087ee78fab6dd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"f761f425860c66c0b95e9dee38af544b\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"877f76f596cefd9a2579be44ff123e46\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"f527c1d3f3053544ce9ce7e8a4bdb25f\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"f12cff9b660dc51b44e7844c1fb9ff8f\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"2356557138b9aa9c58b17c3f2c3713ba\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"3de1d090961ce832eef5ca054b18a9bf\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6f89c6614d0e52e34d13c2bbb570a71d\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"f325d0bc7ce01bfe2d1a5342848a6463\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"55a669d7455bb036de5814ea1ac56737\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"437d7b2e7b6dea531305d6694242f3a4\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"b7ce2dfccd64f4ef1bbf08146d6c7e54\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"5358c536ef8667aca0526dc6e1ae2903\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"1ec7bae1342609fa287b4d8999f7fa8d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"a42712f2ba3ef5159223992e1d84a3e4\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"141b274dd11e7780d4045c1fa1cad8fa\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"21633a3d2a7126cd54176cb217c626ea\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"1045fd33a5abb795e9bd69e47d5030ca\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bac0df086b9f5b81014325c8b90b17aa\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"979679783b20b8320dcb27f226713e64\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"58db4d45d0229ed787828efd2b421f73\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"230aaef82f89671e5e2a38dda30e3dd6\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"c48e8fe6d32bedf9983da01aabeb6adf\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"139a8d6c5a09df090746dd3c7feac125\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a7c2f933cfcd3d920a577c94c5d78630\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b82d913f6fcbb933c012448230a13de1\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"3b3a1365481ac7bc75b25497a34dfdc0\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"29fd615b2c5e638911ffee5c6157074b\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"280076b30ec48f27f529c747040e9042\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"2353e9ce6cbf496a25494df7275863f0\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"251cdfff7b7e0643f310c2675cd6a590\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"2f37c20dc4ab20a4534b809ece82a42d\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"0bff657d99483eb38765b1055d42adb1\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"fe04bc85ed125ca00aca4ab9b08b8bd4\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"749592107e620923cb2307b2b80fcbb1\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"44175b7066417421d6db7fed1bbc5fe0\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"e4bf4fb58853a29110a9579eddfe5881\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"687cfcd42587633e303b2e1f5eb1d2c4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"415f3ff69ed302728f47625c749fdf67\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9ff1fd58a63812a716a8f677002e9f59\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"04e395181dbfa61f20805b25514765fd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"29e9bd7cec3f06c6df629406a2327005\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"7cb113801ebccb23ae4736b9cb27e289\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file